Class ClientInformationCredentialResolverTest
- java.lang.Object
-
- net.shibboleth.oidc.security.credential.impl.BaseMetadataCredentialResolverTest<net.shibboleth.oidc.security.credential.impl.ClientInformationCredentialResolver>
-
- net.shibboleth.oidc.security.credential.impl.ClientInformationCredentialResolverTest
-
public class ClientInformationCredentialResolverTest extends BaseMetadataCredentialResolverTest<net.shibboleth.oidc.security.credential.impl.ClientInformationCredentialResolver>
Unit tests forClientInformationCredentialResolver.
-
-
Field Summary
Fields Modifier and Type Field Description private static ClassPathResourceCLIENT_INFORMATION_INLINE_KEYSprivate static ClassPathResourceCLIENT_INFORMATION_REMOTE_KEYSprivate static ClassPathResourceCLIENT_INFORMATION_SECRET-
Fields inherited from class net.shibboleth.oidc.security.credential.impl.BaseMetadataCredentialResolverTest
cache, criteria, REMOTE_JWKSET, REMOTE_JWKSET_NO_KEY_ARRAY, REMOTE_JWKSET_NO_KEYS, REMOTE_JWKSET_ROLLOVER, resolver
-
-
Constructor Summary
Constructors Constructor Description ClientInformationCredentialResolverTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CriteriaSetbuildInitialCriteriaSet()Build the criteria to be used by default in the test cases.protected net.shibboleth.oidc.security.credential.impl.ClientInformationCredentialResolverconstructResolver(RemoteJwkSetCache cache)Construct the resolver to be tested.voidtestFail_IncorrectCriteria()voidtestSuccess_InlineJwks()voidtestSuccess_InlineJwks_ForEncryptionAndKeyAlg()voidtestSuccess_InlineJwks_ForKeyAlg()voidtestSuccess_InlineJwks_ForKeyAlgNotFound()voidtestSuccess_InlineJwks_ForSigning()voidtestSuccess_Secret()voidtestSuccess_Secret_noSecretCredentialWhenAsymmetricEncryption()-
Methods inherited from class net.shibboleth.oidc.security.credential.impl.BaseMetadataCredentialResolverTest
createMockHttpClient, readJsonFromFile, setup, testFail_EmptyCriteria, testSuccess_ForEncryption, testSuccess_ForEncryptionAndKeyAlg, testSuccess_ForSigning, testSuccess_KeyRotatedRefetch, testSuccess_NoKeyArray, testSuccess_NoKeys
-
-
-
-
Field Detail
-
CLIENT_INFORMATION_REMOTE_KEYS
private static final ClassPathResource CLIENT_INFORMATION_REMOTE_KEYS
-
CLIENT_INFORMATION_INLINE_KEYS
private static final ClassPathResource CLIENT_INFORMATION_INLINE_KEYS
-
CLIENT_INFORMATION_SECRET
private static final ClassPathResource CLIENT_INFORMATION_SECRET
-
-
Method Detail
-
constructResolver
protected net.shibboleth.oidc.security.credential.impl.ClientInformationCredentialResolver constructResolver(RemoteJwkSetCache cache)
Description copied from class:BaseMetadataCredentialResolverTestConstruct the resolver to be tested.- Specified by:
constructResolverin classBaseMetadataCredentialResolverTest<net.shibboleth.oidc.security.credential.impl.ClientInformationCredentialResolver>- Parameters:
cache- the cache being used by the resolver- Returns:
- the resolver to be tested with the given cache configured
-
buildInitialCriteriaSet
protected CriteriaSet buildInitialCriteriaSet() throws Exception
Description copied from class:BaseMetadataCredentialResolverTestBuild the criteria to be used by default in the test cases.- Specified by:
buildInitialCriteriaSetin classBaseMetadataCredentialResolverTest<net.shibboleth.oidc.security.credential.impl.ClientInformationCredentialResolver>- Returns:
- the criteria set
- Throws:
Exception- on error.
-
testFail_IncorrectCriteria
public void testFail_IncorrectCriteria() throws Exception- Throws:
Exception
-
testSuccess_Secret_noSecretCredentialWhenAsymmetricEncryption
public void testSuccess_Secret_noSecretCredentialWhenAsymmetricEncryption() throws Exception- Throws:
Exception
-
testSuccess_InlineJwks_ForKeyAlg
public void testSuccess_InlineJwks_ForKeyAlg() throws Exception- Throws:
Exception
-
testSuccess_InlineJwks_ForKeyAlgNotFound
public void testSuccess_InlineJwks_ForKeyAlgNotFound() throws Exception- Throws:
Exception
-
testSuccess_InlineJwks_ForEncryptionAndKeyAlg
public void testSuccess_InlineJwks_ForEncryptionAndKeyAlg() throws Exception- Throws:
Exception
-
-