Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
- .AddOpenIdConnect(options =>
- {
- options.SignInScheme = JwtBearerDefaults.AuthenticationScheme;
- options.MetadataAddress = "http://localhost:5000/.well-known/openid-configuration";
- options.RequireHttpsMetadata = false;
- options.ClientId = "user";
- options.ClientSecret = "secret";
- options.ResponseType = OpenIdConnectResponseType.Token;
- })
- .AddJwtBearer(options =>
- {
- options.IncludeErrorDetails = true;
- options.RequireHttpsMetadata = false;
- options.Audience = "http://localhost:5001";
- options.MetadataAddress = "http://localhost:5000/.well-known/openid-configuration";
- options.TokenValidationParameters = new TokenValidationParameters
- {
- ValidIssuer = "http://localhost:5000"
- };
- });
Advertisement
Add Comment
Please, Sign In to add comment