1
- using System ;
2
1
using System . Collections . Generic ;
3
2
using System . Threading . Tasks ;
4
- using Microsoft . AspNetCore . Identity ;
5
3
using VirtoCommerce . Platform . Core . Security ;
6
4
using VirtoCommerce . Platform . Security . Model ;
7
5
@@ -11,30 +9,30 @@ public class BaseUserSignInValidator : IUserSignInValidator
11
9
{
12
10
public int Priority { get ; set ; }
13
11
14
- public Task < IList < TokenLoginResponse > > ValidateUserAsync ( ApplicationUser user , SignInResult signInResult , IDictionary < string , object > context )
12
+ public Task < IList < TokenLoginResponse > > ValidateUserAsync ( ApplicationUser user , IDictionary < string , object > context )
15
13
{
16
14
var result = new List < TokenLoginResponse > ( ) ;
17
15
18
- if ( ! signInResult . Succeeded )
19
- {
20
- var detailedErrors = GetDetailedErrors ( context ) ;
21
- if ( ! detailedErrors )
22
- {
23
- result . Add ( SecurityErrorDescriber . LoginFailed ( ) ) ;
24
- }
25
- else if ( signInResult . IsLockedOut )
26
- {
27
- var permanentLockOut = user . LockoutEnd == DateTime . MaxValue . ToUniversalTime ( ) ;
28
- result . Add ( permanentLockOut ? SecurityErrorDescriber . UserIsLockedOut ( ) : SecurityErrorDescriber . UserIsTemporaryLockedOut ( ) ) ;
29
- }
30
- }
31
- else
32
- {
33
- if ( user . PasswordExpired )
34
- {
35
- result . Add ( SecurityErrorDescriber . PasswordExpired ( ) ) ;
36
- }
37
- }
16
+ // if (!signInResult.Succeeded)
17
+ // {
18
+ // var detailedErrors = GetDetailedErrors(context);
19
+ // if (!detailedErrors)
20
+ // {
21
+ // result.Add(SecurityErrorDescriber.LoginFailed());
22
+ // }
23
+ // else if (signInResult.IsLockedOut)
24
+ // {
25
+ // var permanentLockOut = user.LockoutEnd == DateTime.MaxValue.ToUniversalTime();
26
+ // result.Add(permanentLockOut ? SecurityErrorDescriber.UserIsLockedOut() : SecurityErrorDescriber.UserIsTemporaryLockedOut());
27
+ // }
28
+ // }
29
+ // else
30
+ // {
31
+ // if (user.PasswordExpired)
32
+ // {
33
+ // result.Add(SecurityErrorDescriber.PasswordExpired());
34
+ // }
35
+ // }
38
36
39
37
return Task . FromResult < IList < TokenLoginResponse > > ( result ) ;
40
38
}
0 commit comments