|
|
@ -96,6 +96,14 @@ public partial class TokenController |
|
|
var result = await SignInManager.CheckPasswordSignInAsync(user, request.Password, true); |
|
|
var result = await SignInManager.CheckPasswordSignInAsync(user, request.Password, true); |
|
|
if (!result.Succeeded) |
|
|
if (!result.Succeeded) |
|
|
{ |
|
|
{ |
|
|
|
|
|
await IdentitySecurityLogManager.SaveAsync(new IdentitySecurityLogContext |
|
|
|
|
|
{ |
|
|
|
|
|
Identity = OpenIddictSecurityLogIdentityConsts.OpenIddict, |
|
|
|
|
|
Action = result.ToIdentitySecurityLogAction(), |
|
|
|
|
|
UserName = request.Username, |
|
|
|
|
|
ClientId = request.ClientId |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
string errorDescription; |
|
|
string errorDescription; |
|
|
if (result.IsLockedOut) |
|
|
if (result.IsLockedOut) |
|
|
{ |
|
|
{ |
|
|
@ -138,14 +146,6 @@ public partial class TokenController |
|
|
return await HandleTwoFactorLoginAsync(request, user); |
|
|
return await HandleTwoFactorLoginAsync(request, user); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
await IdentitySecurityLogManager.SaveAsync(new IdentitySecurityLogContext |
|
|
|
|
|
{ |
|
|
|
|
|
Identity = OpenIddictSecurityLogIdentityConsts.OpenIddict, |
|
|
|
|
|
Action = result.ToIdentitySecurityLogAction(), |
|
|
|
|
|
UserName = request.Username, |
|
|
|
|
|
ClientId = request.ClientId |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
return await SetSuccessResultAsync(request, user); |
|
|
return await SetSuccessResultAsync(request, user); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|