Skip to content

Commit

Permalink
Fix remaing jwt issues (#918)
Browse files Browse the repository at this point in the history
  • Loading branch information
akrambek authored Apr 12, 2024
1 parent e5cfb43 commit 411fba2
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@

public final class OpenapiServerNamespaceGenerator extends OpenapiNamespaceGenerator
{
private static final String JWT = "jwt";

@Override
public NamespaceConfig generate(
BindingConfig binding,
Expand Down Expand Up @@ -306,7 +308,7 @@ private <C> RouteConfigBuilder<C> injectHttpServerRouteGuarded(
{
for (String securityItemLabel : securityItem.keySet())
{
if (hasJwt && "jwt".equals(securitySchemes.get(securityItemLabel)))
if (hasJwt && JWT.equalsIgnoreCase(securitySchemes.get(securityItemLabel)))
{
route
.guarded()
Expand Down Expand Up @@ -467,7 +469,7 @@ private Map<String, String> resolveSecuritySchemes(
for (String securitySchemeName : openApi.components.securitySchemes.keySet())
{
String guardType = openApi.components.securitySchemes.get(securitySchemeName).bearerFormat;
if ("jwt".equalsIgnoreCase(guardType))
if (JWT.equalsIgnoreCase(guardType))
{
result.put(securitySchemeName, guardType);
}
Expand Down

0 comments on commit 411fba2

Please sign in to comment.