Class BaseMetadataCredentialResolverTest<T extends net.shibboleth.oidc.security.credential.impl.BasicJOSEObjectCredentialResolver>

    • Field Detail

      • REMOTE_JWKSET

        protected static final ClassPathResource REMOTE_JWKSET
        A remote JWKSet.
      • REMOTE_JWKSET_NO_KEYS

        protected static final ClassPathResource REMOTE_JWKSET_NO_KEYS
        A remote JWKSet with no keys.
      • REMOTE_JWKSET_ROLLOVER

        protected static final ClassPathResource REMOTE_JWKSET_ROLLOVER
        A remote JWKSet with a rolled over key.
      • REMOTE_JWKSET_NO_KEY_ARRAY

        protected static final ClassPathResource REMOTE_JWKSET_NO_KEY_ARRAY
        A remote JWKSet with no keys array.
      • resolver

        protected T extends net.shibboleth.oidc.security.credential.impl.BasicJOSEObjectCredentialResolver resolver
        The resolver to be tested.
      • criteria

        protected CriteriaSet criteria
        The default criteria when testing.
    • Constructor Detail

      • BaseMetadataCredentialResolverTest

        public BaseMetadataCredentialResolverTest()
    • Method Detail

      • createMockHttpClient

        protected org.apache.http.client.HttpClient createMockHttpClient​(String output)
                                                                  throws org.apache.http.client.ClientProtocolException,
                                                                         IOException
        Throws:
        org.apache.http.client.ClientProtocolException
        IOException
      • constructResolver

        protected abstract T constructResolver​(RemoteJwkSetCache cache)
        Construct the resolver to be tested.
        Parameters:
        cache - the cache being used by the resolver
        Returns:
        the resolver to be tested with the given cache configured
      • buildInitialCriteriaSet

        protected abstract CriteriaSet buildInitialCriteriaSet()
                                                        throws Exception
        Build the criteria to be used by default in the test cases.
        Returns:
        the criteria set
        Throws:
        Exception - on error.
      • testFail_EmptyCriteria

        public void testFail_EmptyCriteria()
                                    throws Exception
        Throws:
        Exception
      • testSuccess_ForEncryption

        public void testSuccess_ForEncryption()
                                       throws Exception
        Throws:
        Exception
      • testSuccess_NoKeyArray

        public void testSuccess_NoKeyArray()
                                    throws Exception
        Throws:
        Exception
      • testSuccess_NoKeys

        public void testSuccess_NoKeys()
                                throws Exception
        Throws:
        Exception
      • testSuccess_KeyRotatedRefetch

        public void testSuccess_KeyRotatedRefetch()
                                           throws Exception
        Throws:
        Exception
      • testSuccess_ForEncryptionAndKeyAlg

        public void testSuccess_ForEncryptionAndKeyAlg()
                                                throws Exception
        Throws:
        Exception
      • testSuccess_ForSigning

        public void testSuccess_ForSigning()
                                    throws Exception
        Throws:
        Exception
      • readJsonFromFile

        protected String readJsonFromFile​(@Nonnull
                                          Resource location)
        Read a file into a string.
        Parameters:
        location - the location of the file to read
        Returns:
        the file as a string