Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save talkingdotnet/39694356423c2eb309584391c3f6b05c to your computer and use it in GitHub Desktop.
Save talkingdotnet/39694356423c2eb309584391c3f6b05c to your computer and use it in GitHub Desktop.
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
app.UseCookieAuthentication(new CookieAuthenticationOptions()
{
AuthenticationScheme = "MyCookieMiddlewareInstance",
LoginPath = new PathString("/Account/Unauthorized/"),
AccessDeniedPath = new PathString("/Account/Forbidden/"),
AutomaticAuthenticate = true,
AutomaticChallenge = true
});
app.UseMvc();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment