예제 #1
0
        public UserModelBase VerifyHashedPassword(string username, string plainTextPassword)
        {
            var user = _userQuery.GetUser(username);

            if ((user is null) || string.IsNullOrWhiteSpace(user.HashedPassword))
            {
                return(null);
            }

            var result = _passwordHasher.VerifyHashedPassword(user, user.HashedPassword, plainTextPassword);

            return(result == PasswordVerificationResult.Success ? user : null);
        }
예제 #2
0
 public async Task <GetUserDto> GetUser(long id)
 {
     return(await _UserQuery.GetUser(id));
 }
예제 #3
0
 public async Task <ActionResult <UserDto> > GetUser() => await _userQuery.GetUser();