Class AbstractFileOIDCEntityResolver<Key extends com.nimbusds.oauth2.sdk.id.Identifier,Value>
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
-
- net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
-
- net.shibboleth.oidc.metadata.impl.AbstractOIDCEntityResolver<Key,Value>
-
- net.shibboleth.oidc.metadata.impl.AbstractReloadingOIDCEntityResolver<Key,Value>
-
- net.shibboleth.oidc.metadata.impl.AbstractFileOIDCEntityResolver<Key,Value>
-
- Type Parameters:
Key- The identifier type in the backing storeValue- The entity type in the backing store
- All Implemented Interfaces:
Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent
- Direct Known Subclasses:
FilesystemClientInformationResolver,FilesystemProviderMetadataResolver
public abstract class AbstractFileOIDCEntityResolver<Key extends com.nimbusds.oauth2.sdk.id.Identifier,Value> extends AbstractReloadingOIDCEntityResolver<Key,Value>
Based onFilesystemMetadataResolver.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.shibboleth.oidc.metadata.impl.AbstractOIDCEntityResolver
AbstractOIDCEntityResolver.JsonBackingStore
-
-
Field Summary
Fields Modifier and Type Field Description private org.slf4j.LoggerlogClass logger.private FilemetadataFileThe metadata file.
-
Constructor Summary
Constructors Constructor Description AbstractFileOIDCEntityResolver(Timer backgroundTaskTimer, Resource metadata)Constructor.AbstractFileOIDCEntityResolver(Resource metadata)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoDestroy()protected byte[]fetchMetadata()Fetches metadata from a source.protected StringgetMetadataIdentifier()Gets an identifier which may be used to distinguish this metadata in logging statements.protected InstantgetMetadataUpdateTime()Get the time for the last update/modification of the metadata file.protected voidsetMetadataFile(File file)Sets the file from which metadata is read.-
Methods inherited from class net.shibboleth.oidc.metadata.impl.AbstractReloadingOIDCEntityResolver
getKey, getLastRefresh, getLastUpdate, initOIDCResolver, parse, refresh, scheduleNextRefresh, setMaxRefreshDelay, setMinRefreshDelay
-
Methods inherited from class net.shibboleth.oidc.metadata.impl.AbstractOIDCEntityResolver
createNewBackingStore, doInitialize, getBackingStore, getLogPrefix, indexEntityDescriptor, isFailFastInitialization, lookupIdentifier, lookupIndexedIdentifier, preProcessEntityDescriptor, removeByIdentifier, setBackingStore, setFailFastInitialization
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
setId
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
getId
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, initialize, isDestroyed, isInitialized
-
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.component.IdentifiedComponent
getId
-
-
-
-
Field Detail
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
metadataFile
@Nonnull private File metadataFile
The metadata file.
-
-
Constructor Detail
-
AbstractFileOIDCEntityResolver
public AbstractFileOIDCEntityResolver(@Nonnull Resource metadata) throws IOExceptionConstructor.- Parameters:
metadata- the metadata file- Throws:
IOException- If the metedata cannot be loaded.
-
AbstractFileOIDCEntityResolver
public AbstractFileOIDCEntityResolver(@Nullable Timer backgroundTaskTimer, @Nonnull Resource metadata) throws IOExceptionConstructor.- Parameters:
metadata- the metadata filebackgroundTaskTimer- timer used to refresh metadata in the background- Throws:
IOException- If the metedata cannot be loaded.
-
-
Method Detail
-
setMetadataFile
protected void setMetadataFile(@Nonnull File file)Sets the file from which metadata is read.- Parameters:
file- path to the metadata file
-
doDestroy
protected void doDestroy()
- Overrides:
doDestroyin classAbstractInitializableComponent
-
getMetadataIdentifier
protected String getMetadataIdentifier()
Gets an identifier which may be used to distinguish this metadata in logging statements.- Specified by:
getMetadataIdentifierin classAbstractReloadingOIDCEntityResolver<Key extends com.nimbusds.oauth2.sdk.id.Identifier,Value>- Returns:
- identifier which may be used to distinguish this metadata in logging statements
-
getMetadataUpdateTime
protected Instant getMetadataUpdateTime()
Get the time for the last update/modification of the metadata file.- Returns:
- The last update time.
-
fetchMetadata
protected byte[] fetchMetadata() throws ResolverExceptionFetches metadata from a source.- Specified by:
fetchMetadatain classAbstractReloadingOIDCEntityResolver<Key extends com.nimbusds.oauth2.sdk.id.Identifier,Value>- Returns:
- the fetched metadata, or null if the metadata is known not to have changed since the last retrieval
- Throws:
ResolverException- thrown if there is a problem fetching the metadata
-
-