public IActionResult Logout() { try { JwtClaimM jwt_claim = _jwtAuth.GetClaims(Request); _jwtAuth.RemoveAudience(jwt_claim.AdminUserId, jwt_claim.UserId); return(Ok("Logout success")); } catch (Exception e) { return(GetError(e)); } }
public IActionResult Logout(string jwt) { try { JwtClaimM jwt_claim; if (string.IsNullOrEmpty(jwt)) { jwt_claim = _jwtAuth.GetClaims(Request); } else { jwt_claim = _jwtAuth.GetClaims(jwt); } _jwtAuth.RemoveAudience(jwt_claim.AdminUserId, jwt_claim.UserId); return(Ok("Logout success")); } catch (Exception e) { return(GetError(e)); } }