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); }
public async Task <GetUserDto> GetUser(long id) { return(await _UserQuery.GetUser(id)); }
public async Task <ActionResult <UserDto> > GetUser() => await _userQuery.GetUser();