Skip to content

Commit 6214dfb

Browse files
refactor(auth): use generic security entities
1 parent db0a8b5 commit 6214dfb

File tree

82 files changed

+406
-393
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+406
-393
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 Ahmet Çetinkaya
3+
Copyright (c) 2022 Kodlama.io
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

NArchitecture.sln

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StarterProject.Application.
6060
EndProject
6161
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8A52191F-DCC6-4487-AFFF-4B6BB86231FC}"
6262
ProjectSection(SolutionItems) = preProject
63+
.csharpierrc = .csharpierrc
6364
.editorconfig = .editorconfig
65+
LICENSE = LICENSE
66+
README.md = README.md
6467
EndProjectSection
6568
EndProject
6669
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Core.Persistence.DependencyInjection", "src\corePackages\Core.Persistence.DependencyInjection\Core.Persistence.DependencyInjection.csproj", "{E1F0BD02-5781-4309-B469-DFDA36C2462E}"

src/starterProject/Application/Features/Auth/Commands/EnableEmailAuthenticator/EnableEmailAuthenticatorCommand.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,17 @@ IAuthenticatorService authenticatorService
5555

5656
public async Task Handle(EnableEmailAuthenticatorCommand request, CancellationToken cancellationToken)
5757
{
58-
User? user = await _userService.GetAsync(predicate: u => u.Id == request.UserId, cancellationToken: cancellationToken);
58+
User<int, int>? user = await _userService.GetAsync(predicate: u => u.Id == request.UserId, cancellationToken: cancellationToken);
5959
await _authBusinessRules.UserShouldBeExistsWhenSelected(user);
6060
await _authBusinessRules.UserShouldNotBeHaveAuthenticator(user!);
6161

6262
user!.AuthenticatorType = AuthenticatorType.Email;
6363
await _userService.UpdateAsync(user);
6464

65-
EmailAuthenticator emailAuthenticator = await _authenticatorService.CreateEmailAuthenticator(user);
66-
EmailAuthenticator addedEmailAuthenticator = await _emailAuthenticatorRepository.AddAsync(emailAuthenticator);
65+
EmailAuthenticator<int, int> emailAuthenticator = await _authenticatorService.CreateEmailAuthenticator(user);
66+
EmailAuthenticator<int, int> addedEmailAuthenticator = await _emailAuthenticatorRepository.AddAsync(emailAuthenticator);
6767

68-
var toEmailList = new List<MailboxAddress> { new(name: $"{user.FirstName} {user.LastName}", user.Email) };
68+
var toEmailList = new List<MailboxAddress> { new(name: user.Email, user.Email) };
6969

7070
_mailService.SendMail(
7171
new Mail

src/starterProject/Application/Features/Auth/Commands/EnableOtpAuthenticator/EnableOtpAuthenticatorCommand.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,20 @@ public async Task<EnabledOtpAuthenticatorResponse> Handle(
3939
CancellationToken cancellationToken
4040
)
4141
{
42-
User? user = await _userService.GetAsync(predicate: u => u.Id == request.UserId, cancellationToken: cancellationToken);
42+
User<int, int>? user = await _userService.GetAsync(predicate: u => u.Id == request.UserId, cancellationToken: cancellationToken);
4343
await _authBusinessRules.UserShouldBeExistsWhenSelected(user);
4444
await _authBusinessRules.UserShouldNotBeHaveAuthenticator(user!);
4545

46-
OtpAuthenticator? doesExistOtpAuthenticator = await _otpAuthenticatorRepository.GetAsync(
46+
OtpAuthenticator<int, int>? doesExistOtpAuthenticator = await _otpAuthenticatorRepository.GetAsync(
4747
predicate: o => o.UserId == request.UserId,
4848
cancellationToken: cancellationToken
4949
);
5050
await _authBusinessRules.OtpAuthenticatorThatVerifiedShouldNotBeExists(doesExistOtpAuthenticator);
5151
if (doesExistOtpAuthenticator is not null)
5252
await _otpAuthenticatorRepository.DeleteAsync(doesExistOtpAuthenticator);
5353

54-
OtpAuthenticator newOtpAuthenticator = await _authenticatorService.CreateOtpAuthenticator(user!);
55-
OtpAuthenticator addedOtpAuthenticator = await _otpAuthenticatorRepository.AddAsync(newOtpAuthenticator);
54+
OtpAuthenticator<int, int> newOtpAuthenticator = await _authenticatorService.CreateOtpAuthenticator(user!);
55+
OtpAuthenticator<int, int> addedOtpAuthenticator = await _otpAuthenticatorRepository.AddAsync(newOtpAuthenticator);
5656

5757
EnabledOtpAuthenticatorResponse enabledOtpAuthenticatorDto =
5858
new() { SecretKey = await _authenticatorService.ConvertSecretKeyToString(addedOtpAuthenticator.SecretKey) };

src/starterProject/Application/Features/Auth/Commands/Login/LoggedResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace Application.Features.Auth.Commands.Login;
77
public class LoggedResponse : IResponse
88
{
99
public AccessToken? AccessToken { get; set; }
10-
public Core.Security.Entities.RefreshToken? RefreshToken { get; set; }
10+
public Core.Security.Entities.RefreshToken<int, int>? RefreshToken { get; set; }
1111
public AuthenticatorType? RequiredAuthenticatorType { get; set; }
1212

1313
public LoggedHttpResponse ToHttpResponse() =>

src/starterProject/Application/Features/Auth/Commands/Login/LoginCommand.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ IAuthenticatorService authenticatorService
4949

5050
public async Task<LoggedResponse> Handle(LoginCommand request, CancellationToken cancellationToken)
5151
{
52-
User? user = await _userService.GetAsync(
52+
User<int, int>? user = await _userService.GetAsync(
5353
predicate: u => u.Email == request.UserForLoginDto.Email,
5454
cancellationToken: cancellationToken
5555
);
@@ -72,8 +72,8 @@ public async Task<LoggedResponse> Handle(LoginCommand request, CancellationToken
7272

7373
AccessToken createdAccessToken = await _authService.CreateAccessToken(user);
7474

75-
Core.Security.Entities.RefreshToken createdRefreshToken = await _authService.CreateRefreshToken(user, request.IpAddress);
76-
Core.Security.Entities.RefreshToken addedRefreshToken = await _authService.AddRefreshToken(createdRefreshToken);
75+
Core.Security.Entities.RefreshToken<int, int> createdRefreshToken = await _authService.CreateRefreshToken(user, request.IpAddress);
76+
Core.Security.Entities.RefreshToken<int, int> addedRefreshToken = await _authService.AddRefreshToken(createdRefreshToken);
7777
await _authService.DeleteOldRefreshTokens(user.Id);
7878

7979
loggedResponse.AccessToken = createdAccessToken;

src/starterProject/Application/Features/Auth/Commands/RefreshToken/RefreshTokenCommand.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,26 +39,26 @@ public RefreshTokenCommandHandler(IAuthService authService, IUserService userSer
3939

4040
public async Task<RefreshedTokensResponse> Handle(RefreshTokenCommand request, CancellationToken cancellationToken)
4141
{
42-
Core.Security.Entities.RefreshToken? refreshToken = await _authService.GetRefreshTokenByToken(request.RefreshToken);
42+
Core.Security.Entities.RefreshToken<int, int>? refreshToken = await _authService.GetRefreshTokenByToken(request.RefreshToken);
4343
await _authBusinessRules.RefreshTokenShouldBeExists(refreshToken);
4444

45-
if (refreshToken!.Revoked != null)
45+
if (refreshToken!.RevokedDate != null)
4646
await _authService.RevokeDescendantRefreshTokens(
4747
refreshToken,
4848
request.IpAddress,
4949
reason: $"Attempted reuse of revoked ancestor token: {refreshToken.Token}"
5050
);
5151
await _authBusinessRules.RefreshTokenShouldBeActive(refreshToken);
5252

53-
User? user = await _userService.GetAsync(predicate: u => u.Id == refreshToken.UserId, cancellationToken: cancellationToken);
53+
User<int, int>? user = await _userService.GetAsync(predicate: u => u.Id == refreshToken.UserId, cancellationToken: cancellationToken);
5454
await _authBusinessRules.UserShouldBeExistsWhenSelected(user);
5555

56-
Core.Security.Entities.RefreshToken newRefreshToken = await _authService.RotateRefreshToken(
56+
Core.Security.Entities.RefreshToken<int, int> newRefreshToken = await _authService.RotateRefreshToken(
5757
user: user!,
5858
refreshToken,
5959
request.IpAddress
6060
);
61-
Core.Security.Entities.RefreshToken addedRefreshToken = await _authService.AddRefreshToken(newRefreshToken);
61+
Core.Security.Entities.RefreshToken<int, int> addedRefreshToken = await _authService.AddRefreshToken(newRefreshToken);
6262
await _authService.DeleteOldRefreshTokens(refreshToken.UserId);
6363

6464
AccessToken createdAccessToken = await _authService.CreateAccessToken(user!);

src/starterProject/Application/Features/Auth/Commands/RefreshToken/RefreshedTokensResponse.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ namespace Application.Features.Auth.Commands.RefreshToken;
66
public class RefreshedTokensResponse : IResponse
77
{
88
public AccessToken AccessToken { get; set; }
9-
public Core.Security.Entities.RefreshToken RefreshToken { get; set; }
9+
public Core.Security.Entities.RefreshToken<int, int> RefreshToken { get; set; }
1010

1111
public RefreshedTokensResponse()
1212
{
1313
AccessToken = null!;
1414
RefreshToken = null!;
1515
}
1616

17-
public RefreshedTokensResponse(AccessToken accessToken, Core.Security.Entities.RefreshToken refreshToken)
17+
public RefreshedTokensResponse(AccessToken accessToken, Core.Security.Entities.RefreshToken<int, int> refreshToken)
1818
{
1919
AccessToken = accessToken;
2020
RefreshToken = refreshToken;

src/starterProject/Application/Features/Auth/Commands/Register/RegisterCommand.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,19 @@ public async Task<RegisteredResponse> Handle(RegisterCommand request, Cancellati
4848
passwordHash: out byte[] passwordHash,
4949
passwordSalt: out byte[] passwordSalt
5050
);
51-
User newUser =
51+
User<int, int> newUser =
5252
new()
5353
{
5454
Email = request.UserForRegisterDto.Email,
55-
FirstName = request.UserForRegisterDto.FirstName,
56-
LastName = request.UserForRegisterDto.LastName,
5755
PasswordHash = passwordHash,
5856
PasswordSalt = passwordSalt,
59-
Status = true
6057
};
61-
User createdUser = await _userRepository.AddAsync(newUser);
58+
User<int, int> createdUser = await _userRepository.AddAsync(newUser);
6259

6360
AccessToken createdAccessToken = await _authService.CreateAccessToken(createdUser);
6461

65-
Core.Security.Entities.RefreshToken createdRefreshToken = await _authService.CreateRefreshToken(createdUser, request.IpAddress);
66-
Core.Security.Entities.RefreshToken addedRefreshToken = await _authService.AddRefreshToken(createdRefreshToken);
62+
Core.Security.Entities.RefreshToken<int, int> createdRefreshToken = await _authService.CreateRefreshToken(createdUser, request.IpAddress);
63+
Core.Security.Entities.RefreshToken<int, int> addedRefreshToken = await _authService.AddRefreshToken(createdRefreshToken);
6764

6865
RegisteredResponse registeredResponse = new() { AccessToken = createdAccessToken, RefreshToken = addedRefreshToken };
6966
return registeredResponse;
Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
11
using FluentValidation;
2+
using System.Text.RegularExpressions;
23

34
namespace Application.Features.Auth.Commands.Register;
45

56
public class RegisterCommandValidator : AbstractValidator<RegisterCommand>
67
{
78
public RegisterCommandValidator()
89
{
9-
RuleFor(c => c.UserForRegisterDto.FirstName).NotEmpty().MinimumLength(2);
10-
RuleFor(c => c.UserForRegisterDto.LastName).NotEmpty().MinimumLength(2);
1110
RuleFor(c => c.UserForRegisterDto.Email).NotEmpty().EmailAddress();
12-
RuleFor(c => c.UserForRegisterDto.Password).NotEmpty().MinimumLength(4);
11+
RuleFor(c => c.UserForRegisterDto.Password)
12+
.NotEmpty()
13+
.MinimumLength(6)
14+
.Must(StrongPassword)
15+
.WithMessage(
16+
"Password must contain at least one uppercase letter, one lowercase letter, one number and one special character."
17+
);
18+
}
19+
20+
private bool StrongPassword(string value)
21+
{
22+
Regex strongPasswordRegex = new("^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$", RegexOptions.Compiled);
23+
24+
return strongPasswordRegex.IsMatch(value);
1325
}
1426
}

src/starterProject/Application/Features/Auth/Commands/Register/RegisteredResponse.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ namespace Application.Features.Auth.Commands.Register;
66
public class RegisteredResponse : IResponse
77
{
88
public AccessToken AccessToken { get; set; }
9-
public Core.Security.Entities.RefreshToken RefreshToken { get; set; }
9+
public Core.Security.Entities.RefreshToken<int, int> RefreshToken { get; set; }
1010

1111
public RegisteredResponse()
1212
{
1313
AccessToken = null!;
1414
RefreshToken = null!;
1515
}
1616

17-
public RegisteredResponse(AccessToken accessToken, Core.Security.Entities.RefreshToken refreshToken)
17+
public RegisteredResponse(AccessToken accessToken, Core.Security.Entities.RefreshToken<int, int> refreshToken)
1818
{
1919
AccessToken = accessToken;
2020
RefreshToken = refreshToken;

src/starterProject/Application/Features/Auth/Commands/RevokeToken/RevokeTokenCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public RevokeTokenCommandHandler(IAuthService authService, AuthBusinessRules aut
4242

4343
public async Task<RevokedTokenResponse> Handle(RevokeTokenCommand request, CancellationToken cancellationToken)
4444
{
45-
Core.Security.Entities.RefreshToken? refreshToken = await _authService.GetRefreshTokenByToken(request.Token);
45+
Core.Security.Entities.RefreshToken<int, int>? refreshToken = await _authService.GetRefreshTokenByToken(request.Token);
4646
await _authBusinessRules.RefreshTokenShouldBeExists(refreshToken);
4747
await _authBusinessRules.RefreshTokenShouldBeActive(refreshToken!);
4848

src/starterProject/Application/Features/Auth/Commands/VerifyEmailAuthenticator/VerifyEmailAuthenticatorCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ AuthBusinessRules authBusinessRules
3535

3636
public async Task Handle(VerifyEmailAuthenticatorCommand request, CancellationToken cancellationToken)
3737
{
38-
EmailAuthenticator? emailAuthenticator = await _emailAuthenticatorRepository.GetAsync(
38+
EmailAuthenticator<int, int>? emailAuthenticator = await _emailAuthenticatorRepository.GetAsync(
3939
predicate: e => e.ActivationKey == request.ActivationKey,
4040
cancellationToken: cancellationToken
4141
);

src/starterProject/Application/Features/Auth/Commands/VerifyOtpAuthenticator/VerifyOtpAuthenticatorCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ IAuthenticatorService authenticatorService
4949

5050
public async Task Handle(VerifyOtpAuthenticatorCommand request, CancellationToken cancellationToken)
5151
{
52-
OtpAuthenticator? otpAuthenticator = await _otpAuthenticatorRepository.GetAsync(
52+
OtpAuthenticator<int, int>? otpAuthenticator = await _otpAuthenticatorRepository.GetAsync(
5353
predicate: e => e.UserId == request.UserId,
5454
cancellationToken: cancellationToken
5555
);
5656
await _authBusinessRules.OtpAuthenticatorShouldBeExists(otpAuthenticator);
5757

58-
User? user = await _userService.GetAsync(predicate: u => u.Id == request.UserId, cancellationToken: cancellationToken);
58+
User<int, int>? user = await _userService.GetAsync(predicate: u => u.Id == request.UserId, cancellationToken: cancellationToken);
5959
await _authBusinessRules.UserShouldBeExistsWhenSelected(user);
6060

6161
otpAuthenticator!.IsVerified = true;
Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1-
namespace Application.Features.Auth.Constants;
1+
using Core.Security.Attributes;
22

3+
namespace Application.Features.Auth.Constants;
4+
5+
[OperationClaimConstants]
36
public static class AuthOperationClaims
47
{
5-
public const string Admin = "Auth.Admin";
6-
public const string Write = "Auth.Write";
7-
public const string Read = "Auth.Read";
8-
public const string RevokeToken = "Auth.RevokeToken";
8+
private const string _section = "Auth";
9+
10+
public const string Admin = $"{_section}.Admin";
11+
12+
public const string Write = $"{_section}.Write";
13+
public const string Read = $"{_section}.Read";
14+
15+
public const string RevokeToken = $"{_section}.RevokeToken";
916
}

src/starterProject/Application/Features/Auth/Profiles/MappingProfiles.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ public class MappingProfiles : Profile
88
{
99
public MappingProfiles()
1010
{
11-
CreateMap<RefreshToken, RevokedTokenResponse>().ReverseMap();
11+
CreateMap<RefreshToken<int, int>, RevokedTokenResponse>().ReverseMap();
1212
}
1313
}

src/starterProject/Application/Features/Auth/Resources/Locales/auth.en.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
OtpAuthenticatorDontExists: "OTP authenticator don't exists."
33
AlreadyVerifiedOtpAuthenticatorIsExists: "Already verified OTP authenticator is exists."
44
EmailActivationKeyDontExists: "Email Activation Key don't exists."
5-
UserDontExists: "User don't exists."
6-
UserHaveAlreadyAAuthenticator: "User have already a authenticator."
5+
UserDontExists: "User<int, int> don't exists."
6+
UserHaveAlreadyAAuthenticator: "User<int, int> have already a authenticator."
77
RefreshDontExists: "Refresh don't exists."
88
InvalidRefreshToken: "Invalid refresh token."
9-
UserMailAlreadyExists: "User mail already exists."
9+
UserMailAlreadyExists: "User<int, int> mail already exists."
1010
PasswordDontMatch: "Password don't match."

src/starterProject/Application/Features/Auth/Rules/AuthBusinessRules.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,51 +26,51 @@ private async Task throwBusinessException(string messageKey)
2626
throw new BusinessException(message);
2727
}
2828

29-
public async Task EmailAuthenticatorShouldBeExists(EmailAuthenticator? emailAuthenticator)
29+
public async Task EmailAuthenticatorShouldBeExists(EmailAuthenticator<int, int>? emailAuthenticator)
3030
{
3131
if (emailAuthenticator is null)
3232
await throwBusinessException(AuthMessages.EmailAuthenticatorDontExists);
3333
}
3434

35-
public async Task OtpAuthenticatorShouldBeExists(OtpAuthenticator? otpAuthenticator)
35+
public async Task OtpAuthenticatorShouldBeExists(OtpAuthenticator<int, int>? otpAuthenticator)
3636
{
3737
if (otpAuthenticator is null)
3838
await throwBusinessException(AuthMessages.OtpAuthenticatorDontExists);
3939
}
4040

41-
public async Task OtpAuthenticatorThatVerifiedShouldNotBeExists(OtpAuthenticator? otpAuthenticator)
41+
public async Task OtpAuthenticatorThatVerifiedShouldNotBeExists(OtpAuthenticator<int, int>? otpAuthenticator)
4242
{
4343
if (otpAuthenticator is not null && otpAuthenticator.IsVerified)
4444
await throwBusinessException(AuthMessages.AlreadyVerifiedOtpAuthenticatorIsExists);
4545
}
4646

47-
public async Task EmailAuthenticatorActivationKeyShouldBeExists(EmailAuthenticator emailAuthenticator)
47+
public async Task EmailAuthenticatorActivationKeyShouldBeExists(EmailAuthenticator<int, int> emailAuthenticator)
4848
{
4949
if (emailAuthenticator.ActivationKey is null)
5050
await throwBusinessException(AuthMessages.EmailActivationKeyDontExists);
5151
}
5252

53-
public async Task UserShouldBeExistsWhenSelected(User? user)
53+
public async Task UserShouldBeExistsWhenSelected(User<int, int>? user)
5454
{
5555
if (user == null)
5656
await throwBusinessException(AuthMessages.UserDontExists);
5757
}
5858

59-
public async Task UserShouldNotBeHaveAuthenticator(User user)
59+
public async Task UserShouldNotBeHaveAuthenticator(User<int, int> user)
6060
{
6161
if (user.AuthenticatorType != AuthenticatorType.None)
6262
await throwBusinessException(AuthMessages.UserHaveAlreadyAAuthenticator);
6363
}
6464

65-
public async Task RefreshTokenShouldBeExists(RefreshToken? refreshToken)
65+
public async Task RefreshTokenShouldBeExists(RefreshToken<int, int>? refreshToken)
6666
{
6767
if (refreshToken == null)
6868
await throwBusinessException(AuthMessages.RefreshDontExists);
6969
}
7070

71-
public async Task RefreshTokenShouldBeActive(RefreshToken refreshToken)
71+
public async Task RefreshTokenShouldBeActive(RefreshToken<int, int> refreshToken)
7272
{
73-
if (refreshToken.Revoked != null && DateTime.UtcNow >= refreshToken.Expires)
73+
if (refreshToken.RevokedDate != null && DateTime.UtcNow >= refreshToken.ExpiresDate)
7474
await throwBusinessException(AuthMessages.InvalidRefreshToken);
7575
}
7676

@@ -83,7 +83,7 @@ public async Task UserEmailShouldBeNotExists(string email)
8383

8484
public async Task UserPasswordShouldBeMatch(int id, string password)
8585
{
86-
User? user = await _userRepository.GetAsync(predicate: u => u.Id == id, enableTracking: false);
86+
User<int, int>? user = await _userRepository.GetAsync(predicate: u => u.Id == id, enableTracking: false);
8787
await UserShouldBeExistsWhenSelected(user);
8888
if (!HashingHelper.VerifyPasswordHash(password, user!.PasswordHash, user.PasswordSalt))
8989
await throwBusinessException(AuthMessages.PasswordDontMatch);

0 commit comments

Comments
 (0)