public class AbstractKeyLocationResolver extends Object
Modifier and Type | Field and Description |
---|---|
protected JWTAuthContextInfo |
authContextInfo |
protected Object |
forcedRefreshLock |
protected org.jose4j.jwk.HttpsJwks |
httpsJwks |
protected List<org.jose4j.jwk.JsonWebKey> |
jsonWebKeys |
protected Key |
key |
protected long |
lastForcedRefreshTime |
Constructor and Description |
---|
AbstractKeyLocationResolver(JWTAuthContextInfo authContextInfo) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
forcedHttpsJwksRefresh() |
protected org.jose4j.jwk.JsonWebKey |
getHttpsJwk(String kid,
String algo) |
protected static org.jose4j.jwk.JsonWebKey |
getJsonWebKey(String kid,
List<org.jose4j.jwk.JsonWebKey> keys,
String algo) |
protected org.jose4j.jwk.JsonWebKey |
getJsonWebKey(String kid,
String algo) |
protected static String |
getKid(org.jose4j.jwx.JsonWebStructure jws) |
protected Key |
getSecretKeyFromJwk(org.jose4j.jwk.JsonWebKey jwk) |
protected ResourceUtils.UrlStreamResolver |
getUrlResolver() |
protected org.jose4j.jwk.HttpsJwks |
initializeHttpsJwks(String location) |
protected boolean |
isHttpsJwksInitialized(String keyLocation) |
protected static boolean |
isMatchingJwkAvailable(List<org.jose4j.jwk.JsonWebKey> keys,
String kid) |
protected org.jose4j.jwk.JsonWebKey |
loadFromJwk(String content,
String keyId,
String algo) |
protected X509Certificate |
loadPEMCertificate(String content) |
protected String |
readKeyContent(String keyLocation) |
protected static void |
reportLoadKeyException(String keyContent,
String keyLocation,
Exception e) |
protected static void |
reportUnresolvableKeyException(String keyContent,
String keyLocation) |
protected org.jose4j.jwk.JsonWebKey |
tryAsJwk(org.jose4j.jwx.JsonWebStructure jws,
String algo) |
protected org.jose4j.jwk.JsonWebKey |
tryJWKContent(String content,
String keyId,
String algo,
boolean encoded) |
protected static void |
verifyKid(org.jose4j.jwx.JsonWebStructure jws,
String expectedKid) |
protected Key key
protected List<org.jose4j.jwk.JsonWebKey> jsonWebKeys
protected org.jose4j.jwk.HttpsJwks httpsJwks
protected long lastForcedRefreshTime
protected Object forcedRefreshLock
protected JWTAuthContextInfo authContextInfo
public AbstractKeyLocationResolver(JWTAuthContextInfo authContextInfo) throws org.jose4j.lang.UnresolvableKeyException
org.jose4j.lang.UnresolvableKeyException
protected static boolean isMatchingJwkAvailable(List<org.jose4j.jwk.JsonWebKey> keys, String kid)
protected static void verifyKid(org.jose4j.jwx.JsonWebStructure jws, String expectedKid) throws org.jose4j.lang.UnresolvableKeyException
org.jose4j.lang.UnresolvableKeyException
protected static String getKid(org.jose4j.jwx.JsonWebStructure jws)
protected org.jose4j.jwk.HttpsJwks initializeHttpsJwks(String location) throws IOException
IOException
protected boolean isHttpsJwksInitialized(String keyLocation) throws IOException
IOException
protected boolean forcedHttpsJwksRefresh()
protected String readKeyContent(String keyLocation) throws IOException
IOException
protected ResourceUtils.UrlStreamResolver getUrlResolver()
protected static org.jose4j.jwk.JsonWebKey getJsonWebKey(String kid, List<org.jose4j.jwk.JsonWebKey> keys, String algo)
protected static void reportLoadKeyException(String keyContent, String keyLocation, Exception e) throws org.jose4j.lang.UnresolvableKeyException
org.jose4j.lang.UnresolvableKeyException
protected static void reportUnresolvableKeyException(String keyContent, String keyLocation) throws org.jose4j.lang.UnresolvableKeyException
org.jose4j.lang.UnresolvableKeyException
protected org.jose4j.jwk.JsonWebKey tryAsJwk(org.jose4j.jwx.JsonWebStructure jws, String algo) throws org.jose4j.lang.UnresolvableKeyException
org.jose4j.lang.UnresolvableKeyException
protected org.jose4j.jwk.JsonWebKey tryJWKContent(String content, String keyId, String algo, boolean encoded)
protected org.jose4j.jwk.JsonWebKey loadFromJwk(String content, String keyId, String algo)
protected Key getSecretKeyFromJwk(org.jose4j.jwk.JsonWebKey jwk)
protected X509Certificate loadPEMCertificate(String content)
Copyright © 2018–2021. All rights reserved.