Guest User

Untitled

a guest
Jul 18th, 2018
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
  2. .AddOpenIdConnect(options =>
  3. {
  4. options.SignInScheme = JwtBearerDefaults.AuthenticationScheme;
  5. options.MetadataAddress = "http://localhost:5000/.well-known/openid-configuration";
  6. options.RequireHttpsMetadata = false;
  7. options.ClientId = "user";
  8. options.ClientSecret = "secret";
  9. options.ResponseType = OpenIdConnectResponseType.Token;
  10. })
  11. .AddJwtBearer(options =>
  12. {
  13. options.IncludeErrorDetails = true;
  14. options.RequireHttpsMetadata = false;
  15. options.Audience = "http://localhost:5001";
  16. options.MetadataAddress = "http://localhost:5000/.well-known/openid-configuration";
  17. options.TokenValidationParameters = new TokenValidationParameters
  18. {
  19. ValidIssuer = "http://localhost:5000"
  20. };
  21. });
Advertisement
Add Comment
Please, Sign In to add comment