Skip to content

Commit 411fba2

Browse files
authored
Fix remaing jwt issues (#918)
1 parent e5cfb43 commit 411fba2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

runtime/binding-openapi/src/main/java/io/aklivity/zilla/runtime/binding/openapi/internal/config/OpenapiServerNamespaceGenerator.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@
6262

6363
public final class OpenapiServerNamespaceGenerator extends OpenapiNamespaceGenerator
6464
{
65+
private static final String JWT = "jwt";
66+
6567
@Override
6668
public NamespaceConfig generate(
6769
BindingConfig binding,
@@ -306,7 +308,7 @@ private <C> RouteConfigBuilder<C> injectHttpServerRouteGuarded(
306308
{
307309
for (String securityItemLabel : securityItem.keySet())
308310
{
309-
if (hasJwt && "jwt".equals(securitySchemes.get(securityItemLabel)))
311+
if (hasJwt && JWT.equalsIgnoreCase(securitySchemes.get(securityItemLabel)))
310312
{
311313
route
312314
.guarded()
@@ -467,7 +469,7 @@ private Map<String, String> resolveSecuritySchemes(
467469
for (String securitySchemeName : openApi.components.securitySchemes.keySet())
468470
{
469471
String guardType = openApi.components.securitySchemes.get(securitySchemeName).bearerFormat;
470-
if ("jwt".equalsIgnoreCase(guardType))
472+
if (JWT.equalsIgnoreCase(guardType))
471473
{
472474
result.put(securitySchemeName, guardType);
473475
}

0 commit comments

Comments
 (0)