class 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);

}