The QR code token grant trusted a client supplied tenant_id to switch the tenant context
before loading the user, so any caller could resolve a user id under an arbitrary tenant,
and the security events were logged under the generic login actions, which made a QR code
login indistinguishable from a password login in the audit trail.
- drop the tenant_id request parameter and use the tenant carried by the QR code itself
(QrCodeInfo.TenantId, taken from the scanning user's tenant)
- add QrCodeLoginSucceeded / QrCodeLoginFailed to IdentitySecurityLogExtendActionConsts and
use them from the QR code grant and the scan login page, including the failure log that was
missing when the user token does not match
- fix the invalid token branch, which logged LoginLockedout although the account was not
locked out; the real lockout branch keeps LoginLockedout
- update the README: correct grant_type=qr_code, document qrcode_key and drop the parameters
the flow no longer accepts (password, enterpriseId, the two factor and password change ones)
- register LINGYUN.Abp.OpenIddict.QrCode in the solution
BREAKING CHANGE: the QR code token request no longer accepts a tenant_id parameter; the tenant
is taken from the QR code. Clients that relied on passing tenant_id must drop it.
Give the OAuth login and the mini program login their own WeChat Work grant types instead
of sharing one, and add the code2session exchange the mini program flow needs.
- AbpWeChatWorkGlobalConsts.GrantType becomes OAuthGrantType with the value "wecom_oauth",
and MiniProgramGrantType ("wecom_mp") is added
- WeChatWorkTokenExtensionGrant becomes abstract and exposes a FindUserInfoAsync hook;
WeChatWorkOAuthTokenExtensionGrant keeps the existing user info exchange and the new
WeChatWorkMiniProgramTokenExtensionGrant exchanges the js code through
IWeChatWorkUserFinder.GetCode2SessionAsync
- add the code2session model, response and mapping, plus the
/cgi-bin/miniprogram/jscode2session client call
- register both grant types in AbpOpenIddictWeChatWorkModule and allow both custom flows
in AllowWeChatWorkFlow, and migrate the remaining GrantType call sites
BREAKING CHANGE: AbpWeChatWorkGlobalConsts.GrantType was removed and its value changed, so
clients that authenticate with grant_type "wecom" must switch to "wecom_oauth"; the public
WeChatWorkTokenExtensionGrant is now abstract and must be subclassed.
configureawait.props now provides the ConfigureAwait weaver through the Fody 6.9.3
WeaverConfiguration property and sets FodyGenerateXsd=false, so the per-project
FodyWeavers.xml files and every FodyWeavers.xsd are redundant.
- delete 450 FodyWeavers.xml and 438 FodyWeavers.xsd from the framework, modules,
services, gateways, tests and migrations projects and from the micro service template
- every removed FodyWeavers.xml was equivalent to the default supplied by configureawait.props
(439 x <ConfigureAwait ContinueOnCapturedContext="false" />, 20 x <ConfigureAwait />, whose
default is ContinueOnCapturedContext=false, and 2 of those with an XML declaration); no
Blazor / AspNetCore.Components project carried one and the template manifests do not list them
- the aio template keeps its 22 files: its own Directory.Packages.props pins Fody 6.8.0, which
does not support the WeaverConfiguration property
- After the user attempts to log in with a non-existent client Id, an error will be reported when creating a client with the same name due to cache issues
- 用户通过不存在的客户端Id尝试登录时,因缓存问题,将造成同名客户端无法新建