示例#1
0
        public async Task <string> Login(string email, string password)
        {
            var user = await _userRepository.GetAsync(email);

            if (user == null || !_passwordHashService.VerifyPasswordHash(password, user.PasswordHash, user.PasswordSalt))
            {
                throw new InvalidUserCredentialsException();
            }

            return(_jwtTokenService.CreateUserToken(user));
        }