Created
October 1, 2014 23:01
-
-
Save trailmax/5f8756af131c874c9122 to your computer and use it in GitHub Desktop.
Logging out attribute
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LogOutFilterAttribute : ActionFilterAttribute | |
{ | |
public override void OnActionExecuting(ActionExecutingContext filterContext) | |
{ | |
var authenticationManager = filterContext.HttpContext.GetOwinContext().Authentication; | |
authenticationManager.SignOut(); | |
base.OnActionExecuting(filterContext); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment