Class RevocationCache
- 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.idp.plugin.oidc.op.storage.RevocationCache
-
- All Implemented Interfaces:
Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent
@Deprecated(since="3.1.0", forRemoval=true) @ThreadSafeAfterInit public class RevocationCache extends AbstractIdentifiableInitializableComponent
Deprecated, for removal: This API element is subject to removal in a future version.Stores and checks for revocation entries.This class is thread-safe and uses a synchronized method to prevent race conditions within the underlying store (lacking an atomic "check and insert" operation).
-
-
Field Summary
Fields Modifier and Type Field Description private DurationexpiresDeprecated, for removal: This API element is subject to removal in a future version.Lifetime of revocation entry.private org.slf4j.LoggerlogDeprecated, for removal: This API element is subject to removal in a future version.Logger.private StorageServicestorageDeprecated, for removal: This API element is subject to removal in a future version.Backing storage for the replay cache.private booleanstrictDeprecated, for removal: This API element is subject to removal in a future version.Flag controlling behavior on storage failure.
-
Constructor Summary
Constructors Constructor Description RevocationCache()Deprecated, for removal: This API element is subject to removal in a future version.Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voiddoInitialize()Deprecated, for removal: This API element is subject to removal in a future version.StorageServicegetStorage()Deprecated, for removal: This API element is subject to removal in a future version.Get the backing store for the cache.booleanisRevoked(String context, String s)Deprecated, for removal: This API element is subject to removal in a future version.Returns false if the value has successfully been confirmed as not revoked.booleanisStrict()Deprecated, for removal: This API element is subject to removal in a future version.Get the strictness flag.booleanrevoke(String context, String s)Deprecated, for removal: This API element is subject to removal in a future version.Returns true if the value is successfully revoked.voidsetEntryExpiration(Duration entryExpiration)Deprecated, for removal: This API element is subject to removal in a future version.Set the revocation entry expiration.voidsetStorage(StorageService storageService)Deprecated, for removal: This API element is subject to removal in a future version.Set the backing store for the cache.voidsetStrict(boolean flag)Deprecated, for removal: This API element is subject to removal in a future version.Set the strictness flag.-
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, doDestroy, 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
private final org.slf4j.Logger log
Deprecated, for removal: This API element is subject to removal in a future version.Logger.
-
storage
private StorageService storage
Deprecated, for removal: This API element is subject to removal in a future version.Backing storage for the replay cache.
-
strict
private boolean strict
Deprecated, for removal: This API element is subject to removal in a future version.Flag controlling behavior on storage failure.
-
-
Method Detail
-
setEntryExpiration
public void setEntryExpiration(@Positive Duration entryExpiration)
Deprecated, for removal: This API element is subject to removal in a future version.Set the revocation entry expiration.- Parameters:
entryExpiration- lifetime of an revocation entry in milliseconds
-
getStorage
@NonnullAfterInit public StorageService getStorage()
Deprecated, for removal: This API element is subject to removal in a future version.Get the backing store for the cache.- Returns:
- the backing store.
-
setStorage
public void setStorage(@Nonnull StorageService storageService)Deprecated, for removal: This API element is subject to removal in a future version.Set the backing store for the cache.- Parameters:
storageService- backing store to use
-
isStrict
public boolean isStrict()
Deprecated, for removal: This API element is subject to removal in a future version.Get the strictness flag.- Returns:
- true iff we should treat storage failures as a replay
-
setStrict
public void setStrict(boolean flag)
Deprecated, for removal: This API element is subject to removal in a future version.Set the strictness flag.- Parameters:
flag- true iff we should treat storage failures as a replay
-
doInitialize
public void doInitialize() throws ComponentInitializationExceptionDeprecated, for removal: This API element is subject to removal in a future version.- Overrides:
doInitializein classAbstractIdentifiedInitializableComponent- Throws:
ComponentInitializationException
-
revoke
public boolean revoke(@Nonnull @NotEmpty String context, @Nonnull @NotEmpty String s)
Deprecated, for removal: This API element is subject to removal in a future version.Returns true if the value is successfully revoked. If value has already been revoked, expiration is updated.- Parameters:
context- a context label to subdivide the caches- value to revoke- Returns:
- true if value has successfully been listed as revoked in the cache.
-
isRevoked
public boolean isRevoked(@Nonnull @NotEmpty String context, @Nonnull @NotEmpty String s)
Deprecated, for removal: This API element is subject to removal in a future version.Returns false if the value has successfully been confirmed as not revoked.- Parameters:
context- a context label to subdivide the caches- value to revoke- Returns:
- false if the check value is not found in the cache
-
-