We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ad07d6 commit 7a28704Copy full SHA for 7a28704
src/c-sharp/JakubKozera.OpenApiUi.Sample/Program.cs
@@ -35,6 +35,22 @@
35
BearerFormat = "JWT",
36
Description = "Enter your JWT token in the format: Bearer {your_token}"
37
});
38
+
39
+ // Add global security requirement - endpoints can opt out with [AllowAnonymous]
40
+ c.AddSecurityRequirement(new OpenApiSecurityRequirement
41
+ {
42
43
+ new OpenApiSecurityScheme
44
45
+ Reference = new OpenApiReference
46
47
+ Type = ReferenceType.SecurityScheme,
48
+ Id = "Bearer"
49
+ }
50
+ },
51
+ Array.Empty<string>()
52
53
+ });
54
55
56
// Register custom services - using direct instantiation as workaround
0 commit comments