예제 #1
0
 public async Task <object> Login([FromBody] AuthUser user)
 {
     if (_userLogin.LoginUser(user).Item1)
     {
         return(Ok(await _jsonWebTokenLogic.GenerateJwtToken(user.Email, user.LastName)));
     }
     return(Unauthorized("User is not registered or password is not correct"));
 }
예제 #2
0
        public IActionResult LoginUser([FromBody] Usuario value)
        {
            var result = userLogin.LoginUser(value);

            if ((bool)result["success"])
            {
                return(Ok(result));
            }
            return(NotFound(result));
        }
 public bool LoginUser(LoginUserEntity item)
 {
     return(repository.LoginUser(item));
 }