Skip to content

Commit

Permalink
issue #173 (#174)
Browse files Browse the repository at this point in the history
- move jwtVerifier initiation from static block to constructor so that if any failure it will stop the server.
  • Loading branch information
BalloonWen authored Feb 18, 2021
1 parent 873c424 commit 8889eb2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -95,6 +95,7 @@ public JwtVerifyHandler() {
}
OpenApiHelper.init(spec);
}
jwtVerifier = new JwtVerifier(config);
}

@Override
Expand Down

0 comments on commit 8889eb2

Please sign in to comment.