コード例 #1
0
        public async Task <ApplicationUserLoginDTO> Authenticate(ApplicationUserAuthRequest model)
        {
            var oUser = await _repository.Authenticate(model.UserNameOrEmail);

            if (oUser == null)
            {
                return(null);
            }

            if (!VerifyPasswordHash(model.Password, oUser.PasswordHash, oUser.PasswordSalt))
            {
                return(null);
            }

            return(_mapper.Map <ApplicationUserLoginDTO>(oUser));
        }