Class RevokeToken
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.profile.action.AbstractProfileAction
org.opensaml.profile.action.AbstractConditionalProfileAction
net.shibboleth.idp.profile.AbstractProfileAction
net.shibboleth.idp.plugin.oidc.op.oauth2.profile.impl.RevokeToken
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
Action that revokes a single token or the full chain of tokens, depending on the result of the configured lookup
strategy for the revocation method. The full chain of tokens refer to the token that is fed to this action together
with all other tokens related to the same root token identifier. For legacy reasons, if the root token identifier
is not existing in the claims set but the full chain is to be revoked, the JWT identifier (jti) from the claims set
is used as the root token identifier.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Function<ProfileRequestContext,Duration> Lookup function to supply chain revocation lifetime.private JWTClaimsSetThe claims set to operate on.private org.slf4j.LoggerClass logger.private RevocationCacheMessage revocation cache instance to use.private DurationRevocation lifetime to use.Revocation method used when revoking a token.private Function<ProfileRequestContext,OAuth2TokenRevocationConfiguration.OAuth2TokenRevocationMethod> Which revocation method should be used when revoking a token.private Function<JWTClaimsSet,String> Lookup function to supply root token identifier.private Function<JWTClaimsSet,Duration> Lookup function to supply token revocation lifetime. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoExecute(ProfileRequestContext profileRequestContext) protected voidprotected booleandoPreExecute(ProfileRequestContext profileRequestContext) voidSet a lookup strategy for the chain revocation lifetime.voidSet the revocation cache instance to use.voidsetRevocationMethodLookupStrategy(Function<ProfileRequestContext, OAuth2TokenRevocationConfiguration.OAuth2TokenRevocationMethod> strategy) Set strategy for looking up which revocation method should be used when revoking a token.voidSet a lookup strategy for the root token identifier.voidSet a lookup strategy for the token revocation lifetime.Methods inherited from class net.shibboleth.idp.profile.AbstractProfileAction
doExecute, execute, getBean, getBean, getMessage, getMessage, getMessage, getParameter, getParameter, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategyMethods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
getActivationCondition, setActivationConditionMethods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, ensureHttpServletRequest, ensureHttpServletResponse, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, isPreExecuteCalled, setHttpServletRequestSupplier, setHttpServletResponseSupplierMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, 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.InitializableComponent
initialize, isInitialized
-
Field Details
-
log
@Nonnull private org.slf4j.Logger logClass logger. -
revocationCache
Message revocation cache instance to use. -
revocationMethodLookupStrategy
@Nonnull private Function<ProfileRequestContext,OAuth2TokenRevocationConfiguration.OAuth2TokenRevocationMethod> revocationMethodLookupStrategyWhich revocation method should be used when revoking a token. Supported values are CHAIN and TOKEN. The default is CHAIN. -
chainRevocationLifetimeLookupStrategy
Lookup function to supply chain revocation lifetime. -
tokenRevocationLifetimeLookupStrategy
Lookup function to supply token revocation lifetime. -
rootTokenIdentifierLookupStrategy
Lookup function to supply root token identifier. -
revocationMethod
Revocation method used when revoking a token. -
revocationLifetime
Revocation lifetime to use. -
claimsSet
The claims set to operate on.
-
-
Constructor Details
-
RevokeToken
public RevokeToken()Constructor.
-
-
Method Details
-
setRevocationCache
Set the revocation cache instance to use.- Parameters:
cache- The revocationCache to set.
-
setRevocationMethodLookupStrategy
public void setRevocationMethodLookupStrategy(@Nonnull Function<ProfileRequestContext, OAuth2TokenRevocationConfiguration.OAuth2TokenRevocationMethod> strategy) Set strategy for looking up which revocation method should be used when revoking a token.- Parameters:
strategy- What to set.
-
setChainRevocationLifetimeLookupStrategy
public void setChainRevocationLifetimeLookupStrategy(@Nullable Function<ProfileRequestContext, Duration> strategy) Set a lookup strategy for the chain revocation lifetime.- Parameters:
strategy- What to set.
-
setTokenRevocationLifetimeLookupStrategy
public void setTokenRevocationLifetimeLookupStrategy(@Nullable Function<JWTClaimsSet, Duration> strategy) Set a lookup strategy for the token revocation lifetime.- Parameters:
strategy- What to set.
-
setRootTokenIdentifierLookupStrategy
Set a lookup strategy for the root token identifier.- Parameters:
strategy- What to set.
-
doInitialize
- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
doPreExecute
- Overrides:
doPreExecutein classAbstractConditionalProfileAction
-
doExecute
- Overrides:
doExecutein classAbstractProfileAction
-