Case sensitivity for Swagger Authentication Scheme
See original GitHub issueIt’s a really small change, but the scheme for JWT Authentication is “bearer” not “Bearer” and yes Postman cares. Don;t know why but it does.
if you could just change
public static void EnableJWTBearerAuth(this AspNetCoreOpenApiDocumentGeneratorSettings settings)
{
settings.AddAuth("JWTBearerAuth", new OpenApiSecurityScheme
{
Type = OpenApiSecuritySchemeType.Http,
Scheme = "Bearer",
BearerFormat = "JWT",
Description = "Enter a JWT token to authorize the requests..."
});
}
to
public static void EnableJWTBearerAuth(this AspNetCoreOpenApiDocumentGeneratorSettings settings)
{
settings.AddAuth("JWTBearerAuth", new OpenApiSecurityScheme
{
Type = OpenApiSecuritySchemeType.Http,
Scheme = "bearer",
BearerFormat = "JWT",
Description = "Enter a JWT token to authorize the requests..."
});
}
Would be much appreciated.
Issue Analytics
- State:
- Created a year ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Is security `scheme` value lowercase or case-insensitive?
client to provide authentication information. It uses a case- insensitive token as a means to identify the authentication scheme,
Read more >OpenAPI Specification - Version 3.0.3
All field names in the specification are case sensitive. This includes all fields that are used as keys in a map, except where...
Read more >OpenAPI Specification - Version 3.0.3
All field names in the specification are case sensitive. This includes all fields that are used as keys in a map, except where...
Read more >Authentication
OpenAPI uses the term security scheme for authentication and authorization schemes. OpenAPI 3.0 lets you describe APIs protected using the following ...
Read more >Basic Structure
All keyword names are case-sensitive. ... and security keywords are used to describe the authentication methods used in your API.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
done 😉
v5.1.1-beta4
has been pushed outguess it’s so insignificant that it flew under everyone’s radar 😉