Skip to content

Instantly share code, notes, and snippets.

@GeorgDangl
Created November 19, 2018 07:05
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 GeorgDangl/04e18a8d24e3c22c0fe50e7f1e4881d6 to your computer and use it in GitHub Desktop.
Save GeorgDangl/04e18a8d24e3c22c0fe50e7f1e4881d6 to your computer and use it in GitHub Desktop.
Multiple JWT authorities in ASP.NET Core
services.AddAuthentication()
.AddJwtBearer(AuthenticationConstants.JWT_BASE_SCHEME, jwtBearerOptions =>
{
jwtBearerOptions.Authority = JwtBaseUri;
jwtBearerOptions.Audience = RequiredScope;
})
.AddJwtBearer(AuthenticationConstants.JWT_FALLBACK_SCHEME, jwtBearerOptions =>
{
jwtBearerOptions.Authority = JwtFallbackBaseUri;
jwtBearerOptions.Audience = RequiredScope;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment