Advertisement
Guest User

Untitled

a guest
Aug 24th, 2019
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. String jwtString = getAccessTokenString(synCtx);
  2. try {
  3. AccessTokenVerifier jwtVerifier = JwtVerifiers.accessTokenVerifierBuilder()
  4. .setIssuer(issuerUrl)
  5. .setAudience(audience)
  6. .setConnectionTimeout(Duration.ofSeconds(1)) // defaults to 1000ms
  7. .setReadTimeout(Duration.ofSeconds(1)) // defaults to 1000ms
  8. .build();
  9. Jwt jwt= jwtVerifier.decode(jwtString);
  10. return true;
  11. } catch (JwtVerificationException e) {
  12. e.printStackTrace();
  13. return false;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement