Class FilesystemClientInformationResolver
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.oidc.metadata.impl.AbstractOIDCEntityResolver<Key,Value>
net.shibboleth.oidc.metadata.impl.AbstractReloadingOIDCEntityResolver<Key,Value>
net.shibboleth.oidc.metadata.impl.AbstractFileOIDCEntityResolver<com.nimbusds.oauth2.sdk.id.ClientID,com.nimbusds.openid.connect.sdk.rp.OIDCClientInformation>
net.shibboleth.oidc.metadata.impl.FilesystemClientInformationResolver
- All Implemented Interfaces:
ClientInformationResolver,RefreshableClientInformationResolver,Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent,Resolver<com.nimbusds.openid.connect.sdk.rp.OIDCClientInformation,CriteriaSet>
public class FilesystemClientInformationResolver
extends AbstractFileOIDCEntityResolver<com.nimbusds.oauth2.sdk.id.ClientID,com.nimbusds.openid.connect.sdk.rp.OIDCClientInformation>
implements RefreshableClientInformationResolver
An OIDC metadata provider that pulls client metadata from a file on the local filesystem.
Based on
FilesystemMetadataResolver.-
Nested Class Summary
Nested classes/interfaces inherited from class net.shibboleth.oidc.metadata.impl.AbstractOIDCEntityResolver
AbstractOIDCEntityResolver.JsonBackingStore -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFilesystemClientInformationResolver(Timer backgroundTaskTimer, Resource metadata) Constructor.FilesystemClientInformationResolver(Resource metadata) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected com.nimbusds.oauth2.sdk.id.ClientIDgetKey(com.nimbusds.openid.connect.sdk.rp.OIDCClientInformation value) Gets the identifier for the given entity.protected List<com.nimbusds.openid.connect.sdk.rp.OIDCClientInformation>parse(byte[] bytes) Parses an entity from the byte array.Iterable<com.nimbusds.openid.connect.sdk.rp.OIDCClientInformation>resolve(CriteriaSet criteria) com.nimbusds.openid.connect.sdk.rp.OIDCClientInformationresolveSingle(CriteriaSet criteria) protected List<com.nimbusds.openid.connect.sdk.rp.OIDCClientInformation>updateKeys(List<com.nimbusds.openid.connect.sdk.rp.OIDCClientInformation> clientInformations) Updates the key set in the given list of OIDC client informations.Methods inherited from class net.shibboleth.oidc.metadata.impl.AbstractFileOIDCEntityResolver
fetchMetadata, getMetadataIdentifier, getMetadataUpdateTime, setMetadataFileMethods inherited from class net.shibboleth.oidc.metadata.impl.AbstractReloadingOIDCEntityResolver
getLastRefresh, getLastUpdate, initOIDCResolver, refresh, scheduleNextRefresh, setMaxRefreshDelay, setMinRefreshDelayMethods inherited from class net.shibboleth.oidc.metadata.impl.AbstractOIDCEntityResolver
createNewBackingStore, getBackingStore, getLogPrefix, indexEntityDescriptor, isFailFastInitialization, lookupIdentifier, lookupIndexedIdentifier, preProcessEntityDescriptor, removeByIdentifier, setBackingStore, setFailFastInitializationMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.IdentifiedComponent
getIdMethods inherited from interface net.shibboleth.oidc.metadata.RefreshableClientInformationResolver
getLastRefresh, getLastUpdate, refresh
-
Field Details
-
log
private final org.slf4j.Logger logClass logger.
-
-
Constructor Details
-
FilesystemClientInformationResolver
Constructor.- Parameters:
metadata- the metadata file- Throws:
IOException- If the metedata cannot be loaded.
-
FilesystemClientInformationResolver
public FilesystemClientInformationResolver(@Nullable Timer backgroundTaskTimer, @Nonnull Resource metadata) throws IOException Constructor.- Parameters:
metadata- the metadata filebackgroundTaskTimer- timer used to refresh metadata in the background- Throws:
IOException- If the metedata cannot be loaded.
-
-
Method Details
-
doInitialize
- Overrides:
doInitializein classAbstractOIDCEntityResolver<com.nimbusds.oauth2.sdk.id.ClientID,com.nimbusds.openid.connect.sdk.rp.OIDCClientInformation> - Throws:
ComponentInitializationException
-
updateKeys
@Nonnull protected List<com.nimbusds.openid.connect.sdk.rp.OIDCClientInformation> updateKeys(@Nonnull List<com.nimbusds.openid.connect.sdk.rp.OIDCClientInformation> clientInformations) Updates the key set in the given list of OIDC client informations. The configured remote JWK set cache is exploited.- Parameters:
clientInformations- The OIDC client informations whose keys are going to be updated.- Returns:
- The OIDC client informations, containing contents of getJWKSetURI() in getJWKSet().
-
parse
@Nonnull protected List<com.nimbusds.openid.connect.sdk.rp.OIDCClientInformation> parse(@Nonnull byte[] bytes) throws com.nimbusds.oauth2.sdk.ParseException Parses an entity from the byte array.- Specified by:
parsein classAbstractReloadingOIDCEntityResolver<com.nimbusds.oauth2.sdk.id.ClientID,com.nimbusds.openid.connect.sdk.rp.OIDCClientInformation> - Parameters:
bytes- The encoded entity- Returns:
- The parsed entity
- Throws:
com.nimbusds.oauth2.sdk.ParseException- if parse fails
-
getKey
@Nonnull protected com.nimbusds.oauth2.sdk.id.ClientID getKey(@Nonnull com.nimbusds.openid.connect.sdk.rp.OIDCClientInformation value) Gets the identifier for the given entity.- Specified by:
getKeyin classAbstractReloadingOIDCEntityResolver<com.nimbusds.oauth2.sdk.id.ClientID,com.nimbusds.openid.connect.sdk.rp.OIDCClientInformation> - Parameters:
value- The entity whose identifier will be returned.- Returns:
- The identifier for the given entity.
-