Skip to content

Instantly share code, notes, and snippets.

@trailmax
Created October 1, 2014 23:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trailmax/5f8756af131c874c9122 to your computer and use it in GitHub Desktop.
Save trailmax/5f8756af131c874c9122 to your computer and use it in GitHub Desktop.
Logging out attribute
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