@Test public void testLoadJWKWithCertOnClassPathWithX5t() throws Exception { RsaJsonWebKey jwk = new RsaJsonWebKey(key); jwk.setOtherParameter("x5c", Collections.singletonList(x5c)); JWTAuthContextInfo contextInfo = new JWTAuthContextInfo(); contextInfo.setPublicKeyContent(jwk.toJson()); X509KeyLocationResolver keyLocationResolver = new X509KeyLocationResolver(contextInfo); when(signature.getX509CertSha1ThumbprintHeaderValue()).thenReturn(x5t); assertEquals(key, keyLocationResolver.resolveKey(signature, emptyList())); }
@Override public Key resolveKey(JsonWebSignature jws, List<JsonWebStructure> nestingContext) throws UnresolvableKeyException { return resolver.resolveKey(jws, nestingContext); }
X509KeyLocationResolver extends AbstractKeyLocationResolver implements VerificationKeyResolver { @Override public Key resolveKey(JsonWebSignature jws, List<JsonWebStructure> nestingContext) throws UnresolvableKeyException { return resolver.resolveKey(jws, nestingContext); } }
X509KeyLocationResolver extends AbstractKeyLocationResolver implements VerificationKeyResolver { @Override public Key resolveKey(JsonWebSignature jws, List<JsonWebStructure> nestingContext) throws UnresolvableKeyException { return resolver.resolveKey(jws, nestingContext); } X509KeyLocationResolver(JWTAuthContextInfo authContextInfo); }
X509KeyLocationResolver extends AbstractKeyLocationResolver implements VerificationKeyResolver { @Override public Key resolveKey(JsonWebSignature jws, List<JsonWebStructure> nestingContext) throws UnresolvableKeyException { return resolver.resolveKey(jws, nestingContext); } X509KeyLocationResolver(JWTAuthContextInfo authContextInfo); @Override Key resolveKey(JsonWebSignature jws, List<JsonWebStructure> nestingContext); }
X509KeyLocationResolver extends AbstractKeyLocationResolver implements VerificationKeyResolver { @Override public Key resolveKey(JsonWebSignature jws, List<JsonWebStructure> nestingContext) throws UnresolvableKeyException { return resolver.resolveKey(jws, nestingContext); } X509KeyLocationResolver(JWTAuthContextInfo authContextInfo); @Override Key resolveKey(JsonWebSignature jws, List<JsonWebStructure> nestingContext);  }