Class AbstractFileOIDCEntityResolver<Key extends Identifier,Value>
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<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 Identifier,Value>
extends AbstractReloadingOIDCEntityResolver<Key,Value>
Based on
FilesystemMetadataResolver.-
Nested Class Summary
Nested classes/interfaces inherited from class net.shibboleth.oidc.metadata.impl.AbstractOIDCEntityResolver
AbstractOIDCEntityResolver.JsonBackingStore -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.LoggerClass logger.private FileThe metadata file. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractFileOIDCEntityResolver(Timer backgroundTaskTimer, Resource metadata) Constructor.protectedAbstractFileOIDCEntityResolver(Resource metadata) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]Fetches metadata from a source.protected StringGets an identifier which may be used to distinguish this metadata in logging statements.protected InstantGet 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, setMinRefreshDelayMethods inherited from class net.shibboleth.oidc.metadata.impl.AbstractOIDCEntityResolver
createNewBackingStore, doInitialize, 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
getId
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
metadataFile
The metadata file.
-
-
Constructor Details
-
AbstractFileOIDCEntityResolver
Constructor.- Parameters:
metadata- the metadata file- Throws:
IOException- If the metedata cannot be loaded.
-
AbstractFileOIDCEntityResolver
protected AbstractFileOIDCEntityResolver(@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
-
setMetadataFile
Sets the file from which metadata is read.- Parameters:
file- path to the metadata file
-
getMetadataIdentifier
Gets an identifier which may be used to distinguish this metadata in logging statements.- Specified by:
getMetadataIdentifierin classAbstractReloadingOIDCEntityResolver<Key extends Identifier,Value> - Returns:
- identifier which may be used to distinguish this metadata in logging statements
-
getMetadataUpdateTime
Get the time for the last update/modification of the metadata file.- Returns:
- The last update time.
-
fetchMetadata
Fetches metadata from a source.- Specified by:
fetchMetadatain classAbstractReloadingOIDCEntityResolver<Key extends Identifier,Value> - Returns:
- the fetched metadata, or
nullif the metadata is known not to have changed since the last retrieval - Throws:
ResolverException- thrown if there is a problem fetching the metadata
-