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
AJOSEObjectCredentialResolverthat resolves credentials from the jwks or contents of jwks_uri of a ClientInformation. If the information contains client secret, it's converted into aBasicJWKCredential. Further filtering of credentials is provided by theAbstractCriteriaFilteringCredentialResolverparent 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
Fields Modifier and Type Field Description private booleanisInitializedInitialization flag.private DurationkeyFetchIntervalThe remote key refresh interval.private org.slf4j.LoggerlogClass logger.private RemoteJwkSetCacheremoteJwkSetCacheThe cache for remote JWK key sets.
-
Constructor Summary
Constructors Constructor Description ClientInformationCredentialResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitialize()booleanisInitialized()protected 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, processJWSHeader
-
Methods inherited from class org.opensaml.security.credential.impl.AbstractCriteriaFilteringCredentialResolver
isSatisfyAllPredicates, resolve, setSatisfyAllPredicates
-
Methods inherited from class org.opensaml.security.credential.impl.AbstractCredentialResolver
resolveSingle
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.shibboleth.utilities.java.support.resolver.Resolver
resolve, resolveSingle
-
-
-
-
Field Detail
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
isInitialized
private boolean isInitialized
Initialization flag.
-
remoteJwkSetCache
@NonnullAfterInit private RemoteJwkSetCache remoteJwkSetCache
The cache for remote JWK key sets.
-
-
Method Detail
-
isInitialized
public boolean isInitialized()
- Specified by:
isInitializedin interfaceInitializableComponent
-
initialize
public void initialize() throws ComponentInitializationException- Specified by:
initializein interfaceInitializableComponent- Throws:
ComponentInitializationException
-
setKeyFetchInterval
public void setKeyFetchInterval(@Positive Duration interval)
Set the remote key refresh interval.- Parameters:
interval- What to set.
-
setRemoteJwkSetCache
public void setRemoteJwkSetCache(RemoteJwkSetCache jwkSetCache)
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).
-
-