Beispiel #1
0
        public IActionResult Signin([FromBody] UserVO user)
        {
            if (user == null)
            {
                return(BadRequest("Invalid client request"));
            }
            var token = _loginBusiness.ValidateCredentials(user);

            if (token == null)
            {
                return(Unauthorized());
            }
            return(Ok(token));
        }
Beispiel #2
0
        public IActionResult SignIn([FromBody] EmployeeVO employee)
        {
            if (employee == null)
            {
                return(BadRequest("Invalid Request"));
            }
            var token = _loginBusiness.ValidateCredentials(employee);

            if (token == null)
            {
                return(Unauthorized());
            }
            return(Ok(token));
        }
Beispiel #3
0
        public IActionResult Signin([FromBody] UserVO user)
        {
            if (user == null)
            {
                return(BadRequest("Nullable user"));
            }
            var token = _business.ValidateCredentials(user);

            if (token == null)
            {
                return(Unauthorized());
            }
            return(Ok(token));
        }
Beispiel #4
0
        public IActionResult SigIn([FromBody] UsuarioVO userVO)
        {
            if (userVO == null)
            {
                return(BadRequest("Invalid Client Request"));
            }
            var token = _business.ValidateCredentials(userVO);

            if (token == null)
            {
                return(Unauthorized());
            }
            return(Ok(token));
        }