Class AbstractKeyLocationResolver

    • Field Detail

      • key

        protected Key key
      • jsonWebKeys

        protected List<org.jose4j.jwk.JsonWebKey> jsonWebKeys
      • httpsJwks

        protected org.jose4j.jwk.HttpsJwks httpsJwks
      • lastForcedRefreshTime

        protected long lastForcedRefreshTime
      • forcedRefreshLock

        protected Object forcedRefreshLock
    • Constructor Detail

      • AbstractKeyLocationResolver

        public AbstractKeyLocationResolver​(JWTAuthContextInfo authContextInfo)
                                    throws org.jose4j.lang.UnresolvableKeyException
        Throws:
        org.jose4j.lang.UnresolvableKeyException
    • Method Detail

      • isMatchingJwkAvailable

        protected static boolean isMatchingJwkAvailable​(List<org.jose4j.jwk.JsonWebKey> keys,
                                                        String kid)
      • verifyKid

        protected static void verifyKid​(org.jose4j.jwx.JsonWebStructure jws,
                                        String expectedKid)
                                 throws org.jose4j.lang.UnresolvableKeyException
        Throws:
        org.jose4j.lang.UnresolvableKeyException
      • getKid

        protected static String getKid​(org.jose4j.jwx.JsonWebStructure jws)
      • getHttpsJwks

        protected org.jose4j.jwk.HttpsJwks getHttpsJwks​(String location)
      • getHttpGet

        protected org.jose4j.http.Get getHttpGet()
      • forcedHttpsJwksRefresh

        protected boolean forcedHttpsJwksRefresh()
      • getJsonWebKey

        protected static org.jose4j.jwk.JsonWebKey getJsonWebKey​(String kid,
                                                                 List<org.jose4j.jwk.JsonWebKey> keys,
                                                                 String algo)
      • reportLoadKeyException

        protected static void reportLoadKeyException​(String keyContent,
                                                     String keyLocation,
                                                     Exception e)
                                              throws org.jose4j.lang.UnresolvableKeyException
        Throws:
        org.jose4j.lang.UnresolvableKeyException
      • reportUnresolvableKeyException

        protected static void reportUnresolvableKeyException​(String keyContent,
                                                             String keyLocation)
                                                      throws org.jose4j.lang.UnresolvableKeyException
        Throws:
        org.jose4j.lang.UnresolvableKeyException
      • tryAsJwk

        protected org.jose4j.jwk.JsonWebKey tryAsJwk​(org.jose4j.jwx.JsonWebStructure jws,
                                                     String algo)
                                              throws org.jose4j.lang.UnresolvableKeyException
        Throws:
        org.jose4j.lang.UnresolvableKeyException
      • getHttpsJwk

        protected org.jose4j.jwk.JsonWebKey getHttpsJwk​(String kid,
                                                        String algo)
      • getJsonWebKey

        protected org.jose4j.jwk.JsonWebKey getJsonWebKey​(String kid,
                                                          String algo)
      • tryJWKContent

        protected org.jose4j.jwk.JsonWebKey tryJWKContent​(String content,
                                                          String keyId,
                                                          String algo,
                                                          boolean encoded)
      • loadFromJwk

        protected org.jose4j.jwk.JsonWebKey loadFromJwk​(String content,
                                                        String keyId,
                                                        String algo)
      • getSecretKeyFromJwk

        protected Key getSecretKeyFromJwk​(org.jose4j.jwk.JsonWebKey jwk)