@Test @Ignore public void jsonECSignatureMatchesJWKS() { String ecSignedToken = "eyJhbGciOiJFUzI1NiJ9.eyJpc3MiOiJhdXRoMCJ9.4iVk3-Y0v4RT4_9IaQlp-8dZ_4fsTzIylgrPTDLrEvTHBTyVS3tgPbr2_IZfLETtiKRqCg0aQ5sh9eIsTTwB1g"; assertThat(cut.validate(ecSignedToken, "ES256", "key-id-1", null, null).isValid(), is(true)); }
@Override public ValidationResult validate(Token token) { String jwksUri; String keyId; try { jwksUri = getOrRequestJwksUri(token); String fallbackPublicKey = null; if (configuration != null && configuration.hasProperty("verificationkey")) { fallbackPublicKey = configuration.getProperty("verificationkey"); } keyId = getOrDefaultKeyId(token); return validate(token.getTokenValue(), getOrDefaultSignatureAlgorithm(token), keyId, jwksUri, fallbackPublicKey); } catch (OAuth2ServiceException | IllegalArgumentException e) { return createInvalid("Error occurred during jwks uri determination: {}", e.getMessage()); } }
JwtSignatureValidator implements Validator<Token> { @Override public ValidationResult validate(Token token) { String jwksUri; String keyId; try { jwksUri = getOrRequestJwksUri(token); String fallbackPublicKey = null; if (configuration != null && configuration.hasProperty("verificationkey")) { fallbackPublicKey = configuration.getProperty("verificationkey"); } keyId = getOrDefaultKeyId(token); return validate(token.getTokenValue(), getOrDefaultSignatureAlgorithm(token), keyId, jwksUri, fallbackPublicKey); } catch (OAuth2ServiceException | IllegalArgumentException e) { return createInvalid("Error occurred during jwks uri determination: {}", e.getMessage()); } } }
JwtSignatureValidator implements Validator<Token> { @Override public ValidationResult validate(Token token) { String jwksUri; String keyId; try { jwksUri = getOrRequestJwksUri(token); String fallbackPublicKey = null; if (configuration != null && configuration.hasProperty("verificationkey")) { fallbackPublicKey = configuration.getProperty("verificationkey"); } keyId = getOrDefaultKeyId(token); return validate(token.getTokenValue(), getOrDefaultSignatureAlgorithm(token), keyId, jwksUri, fallbackPublicKey); } catch (OAuth2ServiceException | IllegalArgumentException e) { return createInvalid("Error occurred during jwks uri determination: {}", e.getMessage()); } } JwtSignatureValidator(OAuth2ServiceConfiguration configuration, OAuth2TokenKeyServiceWithCache tokenKeyService,
			OidcConfigurationServiceWithCache oidcConfigurationService); }
JwtSignatureValidator implements Validator<Token> { @Override public ValidationResult validate(Token token) { String jwksUri; String keyId; try { jwksUri = getOrRequestJwksUri(token); String fallbackPublicKey = null; if (configuration != null && configuration.hasProperty("verificationkey")) { fallbackPublicKey = configuration.getProperty("verificationkey"); } keyId = getOrDefaultKeyId(token); return validate(token.getTokenValue(), getOrDefaultSignatureAlgorithm(token), keyId, jwksUri, fallbackPublicKey); } catch (OAuth2ServiceException | IllegalArgumentException e) { return createInvalid("Error occurred during jwks uri determination: {}", e.getMessage()); } } JwtSignatureValidator(OAuth2ServiceConfiguration configuration, OAuth2TokenKeyServiceWithCache tokenKeyService,
			OidcConfigurationServiceWithCache oidcConfigurationService); @Override ValidationResult validate(Token token); }
JwtSignatureValidator implements Validator<Token> { @Override public ValidationResult validate(Token token) { String jwksUri; String keyId; try { jwksUri = getOrRequestJwksUri(token); String fallbackPublicKey = null; if (configuration != null && configuration.hasProperty("verificationkey")) { fallbackPublicKey = configuration.getProperty("verificationkey"); } keyId = getOrDefaultKeyId(token); return validate(token.getTokenValue(), getOrDefaultSignatureAlgorithm(token), keyId, jwksUri, fallbackPublicKey); } catch (OAuth2ServiceException | IllegalArgumentException e) { return createInvalid("Error occurred during jwks uri determination: {}", e.getMessage()); } } JwtSignatureValidator(OAuth2ServiceConfiguration configuration, OAuth2TokenKeyServiceWithCache tokenKeyService,
			OidcConfigurationServiceWithCache oidcConfigurationService); @Override ValidationResult validate(Token token);  }