diff --git a/openapi-security/src/main/java/com/networknt/openapi/JwtVerifyHandler.java b/openapi-security/src/main/java/com/networknt/openapi/JwtVerifyHandler.java index 909f8f89..33d2b217 100644 --- a/openapi-security/src/main/java/com/networknt/openapi/JwtVerifyHandler.java +++ b/openapi-security/src/main/java/com/networknt/openapi/JwtVerifyHandler.java @@ -79,7 +79,7 @@ public class JwtVerifyHandler implements MiddlewareHandler, IJwtVerifyHandler { config = Config.getInstance().getJsonMapConfig(OPENAPI_SECURITY_CONFIG); // fallback to generic security.yml if(config == null) config = Config.getInstance().getJsonMapConfig(JwtVerifier.SECURITY_CONFIG); - jwtVerifier = new JwtVerifier(config); + } private volatile HttpHandler next; @@ -95,6 +95,7 @@ public JwtVerifyHandler() { } OpenApiHelper.init(spec); } + jwtVerifier = new JwtVerifier(config); } @Override