Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- services.AddSwaggerGen(c =>
- {
- c.SwaggerDoc("v1", new Info { Title = "Example API", Version = "v1" });
- c.AddSecurityDefinition("Bearer", new ApiKeyScheme
- {
- Description = "JWT Authorization header using the Bearer scheme. Example: \"Authorization: Bearer {token}\"",
- Name = "Authorization",
- In = "header",
- Type = "apiKey"
- });
- c.AddSecurityRequirement(new Dictionary<string, IEnumerable<string>>
- {
- { "Bearer", Enumerable.Empty<string>() }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement