public IActionResult Logout([FromBody] JWTModel jwt) { bool res = _authService.Logout(jwt.token); if (!res) { return(this.BadRequest(new { message = "Failed to logout" })); } return(Ok(res)); }
public IActionResult Validate([FromBody] JWTModel jwt) { bool res = _authService.Validate(jwt.token); if (!res) { return(this.NotFound(new { message = "Token is not valid" })); } return(Ok(true)); }