示例#1
0
        public IActionResult Post([FromBody] UserLoginModel loginModel)
        {
            var tokenResponse = _authAppService.Auth(loginModel);

            if (tokenResponse != null)
            {
                return(Ok(tokenResponse));
            }

            return(BadRequest(new ErrorDetail
            {
                Title = "Authentication Failed",
                Status = 400,
                Detail = "User and/or Password invalid!"
            }));
        }