public IHttpActionResult Logout() { this.Authentication.SignOut(DefaultAuthenticationTypes.ExternalBearer); var owinContext = this.Request.GetOwinContext(); var userSessionManager = new UserSessionManager(owinContext); userSessionManager.InvalidateUserSession(); return(this.Ok("Logout successful")); }
//[System.Web.Http.HttpPost] public IHttpActionResult Logout() { Authentication.SignOut(CookieAuthenticationDefaults.AuthenticationType); // Delete the user's session from the database (revoke its bearer token) var userSessionManager = new UserSessionManager(this.repository); userSessionManager.InvalidateUserSession(); return(Ok("Logout successfully")); }
public IHttpActionResult Logout() { // This does not actually perform logout! The OWIN OAuth implementation // does not support "revoke OAuth token" (logout) by design. this.Authentication.SignOut(DefaultAuthenticationTypes.ExternalBearer); // Delete the user's session from the database (revoke its bearer token) var owinContext = this.Request.GetOwinContext(); var userSessionManager = new UserSessionManager(owinContext); userSessionManager.InvalidateUserSession(); return this.Ok(new { message = "Logout successful." }); }
public IHttpActionResult Logout() { this.Authentication.SignOut(DefaultAuthenticationTypes.ExternalBearer); var owinContext = this.Request.GetOwinContext(); var userSessionManager = new UserSessionManager(owinContext); userSessionManager.InvalidateUserSession(); return this.Ok(new { message = LogoutSuccessfulMessage }); }
public IHttpActionResult Logout() { // This does not actually perform logout! The OWIN OAuth implementation // does not support "revoke OAuth token" (logout) by design. this.Authentication.SignOut(DefaultAuthenticationTypes.ExternalBearer); // Delete the user's session from the database (revoke its bearer token) var owinContext = this.Request.GetOwinContext(); var userSessionManager = new UserSessionManager(owinContext); userSessionManager.InvalidateUserSession(); return this.Ok(new { message = "Logout successful." }); }