@Test public void decode_withNonMatchingVerificationKey_throwsException() throws IOException { String token = IOUtils.resourceToString("/token_cc.txt", StandardCharsets.UTF_8); final JwtDecoder cut = new XsuaaJwtDecoderBuilder(configuration).build(); assertThatThrownBy(() -> cut.decode(token)).isInstanceOf(JwtException.class) .hasMessageContaining("Cannot verify with online token key, jku, kid, uaadomain is null"); }
@Override public Jwt decode(String token) throws JwtException { Assert.notNull(token, "token is required"); JWT jwt; try { jwt = JWTParser.parse(token); } catch (ParseException ex) { throw new JwtException("Error initializing JWT decoder: " + ex.getMessage()); } final Jwt verifiedToken = verifyToken(jwt); postValidationActions.forEach(action -> action.perform(verifiedToken)); return verifiedToken; }
XsuaaJwtDecoder implements JwtDecoder { @Override public Jwt decode(String token) throws JwtException { Assert.notNull(token, "token is required"); JWT jwt; try { jwt = JWTParser.parse(token); } catch (ParseException ex) { throw new JwtException("Error initializing JWT decoder: " + ex.getMessage()); } final Jwt verifiedToken = verifyToken(jwt); postValidationActions.forEach(action -> action.perform(verifiedToken)); return verifiedToken; } }
XsuaaJwtDecoder implements JwtDecoder { @Override public Jwt decode(String token) throws JwtException { Assert.notNull(token, "token is required"); JWT jwt; try { jwt = JWTParser.parse(token); } catch (ParseException ex) { throw new JwtException("Error initializing JWT decoder: " + ex.getMessage()); } final Jwt verifiedToken = verifyToken(jwt); postValidationActions.forEach(action -> action.perform(verifiedToken)); return verifiedToken; } XsuaaJwtDecoder(XsuaaServiceConfiguration xsuaaServiceConfiguration, int cacheValidityInSeconds, int cacheSize,
			OAuth2TokenValidator<Jwt> tokenValidators, Collection<PostValidationAction> postValidationActions); }
XsuaaJwtDecoder implements JwtDecoder { @Override public Jwt decode(String token) throws JwtException { Assert.notNull(token, "token is required"); JWT jwt; try { jwt = JWTParser.parse(token); } catch (ParseException ex) { throw new JwtException("Error initializing JWT decoder: " + ex.getMessage()); } final Jwt verifiedToken = verifyToken(jwt); postValidationActions.forEach(action -> action.perform(verifiedToken)); return verifiedToken; } XsuaaJwtDecoder(XsuaaServiceConfiguration xsuaaServiceConfiguration, int cacheValidityInSeconds, int cacheSize,
			OAuth2TokenValidator<Jwt> tokenValidators, Collection<PostValidationAction> postValidationActions); @Override Jwt decode(String token); void setTokenInfoExtractor(TokenInfoExtractor tokenInfoExtractor); void setRestOperations(RestOperations restOperations); }
XsuaaJwtDecoder implements JwtDecoder { @Override public Jwt decode(String token) throws JwtException { Assert.notNull(token, "token is required"); JWT jwt; try { jwt = JWTParser.parse(token); } catch (ParseException ex) { throw new JwtException("Error initializing JWT decoder: " + ex.getMessage()); } final Jwt verifiedToken = verifyToken(jwt); postValidationActions.forEach(action -> action.perform(verifiedToken)); return verifiedToken; } XsuaaJwtDecoder(XsuaaServiceConfiguration xsuaaServiceConfiguration, int cacheValidityInSeconds, int cacheSize,
			OAuth2TokenValidator<Jwt> tokenValidators, Collection<PostValidationAction> postValidationActions); @Override Jwt decode(String token); void setTokenInfoExtractor(TokenInfoExtractor tokenInfoExtractor); void setRestOperations(RestOperations restOperations);  }