Class ClientInformationCredentialResolver
java.lang.Object
org.opensaml.security.credential.impl.AbstractCredentialResolver
org.opensaml.security.credential.impl.AbstractCriteriaFilteringCredentialResolver
net.shibboleth.oidc.security.credential.impl.BasicJOSEObjectCredentialResolver
net.shibboleth.oidc.security.credential.impl.ClientInformationCredentialResolver
- All Implemented Interfaces:
JOSEObjectCredentialResolver,Component,InitializableComponent,Resolver<Credential,,CriteriaSet> CredentialResolver
public class ClientInformationCredentialResolver
extends BasicJOSEObjectCredentialResolver
implements InitializableComponent
A
JOSEObjectCredentialResolver that resolves credentials from the jwks or contents of jwks_uri of a
ClientInformation. If the information contains client secret, it's converted into a BasicJWKCredential.
Further filtering of credentials is provided by the AbstractCriteriaFilteringCredentialResolver parent
class.
Note, only RSA or EC keys are resolved as these are the only key types which should be exposed in public JWKS documents.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanInitialization flag.private DurationThe remote key refresh interval.private final org.slf4j.LoggerClass logger.private RemoteJwkSetCacheThe cache for remote JWK key sets. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanprotected Collection<Credential>resolveFromMetadata(CriteriaSet criteriaSet, com.nimbusds.openid.connect.sdk.rp.OIDCClientInformation information) Fetch the remote JWK Set from the jwk_uri in the RP/Client metadata.protected Iterable<Credential>resolveFromSource(CriteriaSet criteriaSet) voidsetKeyFetchInterval(Duration interval) Set the remote key refresh interval.voidsetRemoteJwkSetCache(RemoteJwkSetCache jwkSetCache) Set the cache for remote JWK key sets.Methods inherited from class net.shibboleth.oidc.security.credential.impl.BasicJOSEObjectCredentialResolver
buildJWKCredential, deriveClientSecretCredential, extractKeyIdFromCriteria, populateCredentialsFromKeySet, postProcess, processJWEHeader, processJWSHeaderMethods inherited from class org.opensaml.security.credential.impl.AbstractCriteriaFilteringCredentialResolver
isSatisfyAllPredicates, resolve, setSatisfyAllPredicatesMethods inherited from class org.opensaml.security.credential.impl.AbstractCredentialResolver
resolveSingleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.utilities.java.support.resolver.Resolver
resolve, resolveSingle
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
isInitialized
private boolean isInitializedInitialization flag. -
remoteJwkSetCache
The cache for remote JWK key sets. -
keyFetchInterval
The remote key refresh interval. Default value: 30 minutes.
-
-
Constructor Details
-
ClientInformationCredentialResolver
public ClientInformationCredentialResolver()
-
-
Method Details
-
isInitialized
public boolean isInitialized()- Specified by:
isInitializedin interfaceInitializableComponent
-
initialize
- Specified by:
initializein interfaceInitializableComponent- Throws:
ComponentInitializationException
-
setKeyFetchInterval
Set the remote key refresh interval.- Parameters:
interval- What to set.
-
setRemoteJwkSetCache
Set the cache for remote JWK key sets.- Parameters:
jwkSetCache- What to set.
-
resolveFromSource
protected Iterable<Credential> resolveFromSource(@Nonnull CriteriaSet criteriaSet) throws ResolverException - Overrides:
resolveFromSourcein classBasicJOSEObjectCredentialResolver- Throws:
ResolverException
-
resolveFromMetadata
@Nonnull protected Collection<Credential> resolveFromMetadata(@Nonnull CriteriaSet criteriaSet, @Nonnull com.nimbusds.openid.connect.sdk.rp.OIDCClientInformation information) Fetch the remote JWK Set from the jwk_uri in the RP/Client metadata. Convert each JWK into aCredentialand return. Only supports EC (key agreement) and RSA (key encryption) keys. If the client information contains client secret, it's converted into aBasicJWKCredential.- Parameters:
criteriaSet- the criteria setinformation- the RP/Client information- Returns:
- a collection of credentials combined of client secret and keys from the key set (if any).
-