Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw orginal exception instead of doing nothing #336

Open
hantsy opened this issue Oct 2, 2022 · 0 comments
Open

Throw orginal exception instead of doing nothing #336

hantsy opened this issue Oct 2, 2022 · 0 comments

Comments

@hantsy
Copy link

hantsy commented Oct 2, 2022

When trying to get auth0, I clone this project and add some debug info the following piece in the https://github.com/eclipse-ee4j/soteria/blob/master/impl/src/main/java/org/glassfish/soteria/mechanisms/openid/domain/AccessTokenImpl.java#L63, it always failed, but there is no helpful error message.

try {
    this.tokenJWT = JWTParser.parse(token);
    jwtClaimsSet = tokenJWT.getJWTClaimsSet();
    this.claims = jwtClaimsSet.getClaims();
} catch (ParseException ex) {
    // Access token doesn't need to be JWT at all
}

I tried to change catch clause to catch (Throwable ex), and printed the exception stack, and finally found the reason of failure of Auth0, the Jwks reading was always timeout on my machine.

I add a jwksReadTimeout = 5000 to override the default value(500) to make Auth0 works.

For me, obviously print the original exception help me to determine the root cause of failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant