Ejemplo n.º 1
0
        private UserCredential CreateUserCredentialDataModel(UserViewModel userModel, long userId)
        {
            var userCredential = new UserCredential
            {
                UserName   = userModel.UserName,
                Password   = CrptoPasswordHash.EncodePasswordToBase64(userModel.Password),
                RegisterAt = DateTime.Now,
                IsActive   = true,
                UserId     = userId
            };

            return(userCredential);
        }
Ejemplo n.º 2
0
 public bool ValidUser(UserLoginModel login)
 {
     return(_userCredentialDataService.AuthenticateUserCredential(login.UserName, CrptoPasswordHash.EncodePasswordToBase64(login.Password)));
 }