Last active
January 14, 2022 21:43
-
-
Save cheoalfredo/23420527d325bad24fc710df188d53b7 to your computer and use it in GitHub Desktop.
Añadiendo soporte para autenticacion contra keycloak(o en su defecto cualquier proveedor oauth/oidc)
This file contains 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
builder.Services.AddAuthorization(); | |
builder.Services.AddAuthentication(options => | |
{ | |
options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme; | |
options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme; | |
}).AddJwtBearer(o => | |
{ | |
o.RequireHttpsMetadata = false; | |
o.Authority = config.GetValue<string>("Jwt:Authority"); | |
o.Audience = config.GetValue<string>("Jwt:Audience"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment