Skip to content

Instantly share code, notes, and snippets.

@scottsauber
Created January 17, 2020 20:10
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 scottsauber/06950b52ca45ab0b937dc59cad19e9de to your computer and use it in GitHub Desktop.
Save scottsauber/06950b52ca45ab0b937dc59cad19e9de to your computer and use it in GitHub Desktop.
public class Startup
{
// Other Startup code omitted
public void ConfigureServices(IServiceCollection services)
{
services.AddAuthorization(options =>
{
options.FallbackPolicy = new AuthorizationPolicyBuilder()
.RequireAuthenticatedUser()
.Build();
// Register other policies here
});
// Other service registrations omitted
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment