Package net.shibboleth.sp.profile.impl
Class RevokeSession
java.lang.Object
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
A profile action to optionally record the revocation of a session in a revocation cache
and signal back an administrative logout result to the Agent.
- Event:
EventIds.PROCEED_EVENT_ID,EventIds.INVALID_PROFILE_CTX- Precondition:
AgentRequestContext.getOutput().isstruct()
- Postcondition:
- optionally a revocation record is stored
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Function<ProfileRequestContext,EventContext> Strategy function for access toEventContextto check.private DDFInput message.static final StringInput member for revocation lifetime.private final org.slf4j.LoggerClass logger.private DurationUpper bound on agent-supplied storage lifetime.private DDFCached output object.static final StringOutput "status" member.static final intFailed "status" value.static final intPartial "status" value.static final intSuccess "status" value.Fields inherited from class net.shibboleth.sp.profile.impl.AbstractRevocationAction
SESSION_ID, STORAGE_CONTEXT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoExecute(ProfileRequestContext profileRequestContext) protected booleandoPreExecute(ProfileRequestContext profileRequestContext) private booleandoRevocation(ProfileRequestContext profileRequestContext) Store a revocation record if configured to do so.private LongGet Agent-supplied storage lifetime in seconds, bounded by configured maximum.voidSet lookup strategy forEventContextto base resulting status on.voidsetMaxStorageTimeout(Duration timeout) Sets the maximum storage life for revocation records that an Agent may request.Methods inherited from class net.shibboleth.sp.profile.impl.AbstractRevocationAction
getSessionID, getStorageContext, getStorageService, setStorageServiceMethods inherited from class net.shibboleth.sp.profile.AbstractApplicationAction
ensureApplication, getApplicationMethods inherited from class net.shibboleth.sp.profile.AbstractAgentAction
ensureAgent, getAgentMethods inherited from class net.shibboleth.sp.profile.AbstractAgentRequestAction
ensureAgentRequestContext, getAgentRequestContext, setAgentRequestContextLookupStrategyMethods 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, doInitialize, 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
-
LIFETIME
Input member for revocation lifetime.- See Also:
-
STATUS
Output "status" member.- See Also:
-
STATUS_SUCCESS
public static final int STATUS_SUCCESSSuccess "status" value.- See Also:
-
STATUS_PARTIAL
public static final int STATUS_PARTIALPartial "status" value.- See Also:
-
STATUS_FAILED
public static final int STATUS_FAILEDFailed "status" value.- See Also:
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
eventContextLookupStrategy
Strategy function for access toEventContextto check. -
maxStorageLifetime
Upper bound on agent-supplied storage lifetime. -
input
Input message. -
output
Cached output object.
-
-
Constructor Details
-
RevokeSession
public RevokeSession()Constructor.
-
-
Method Details
-
setEventContextLookupStrategy
public void setEventContextLookupStrategy(@Nonnull Function<ProfileRequestContext, EventContext> strategy) Set lookup strategy forEventContextto base resulting status on.- Parameters:
strategy- lookup strategy
-
setMaxStorageTimeout
Sets the maximum storage life for revocation records that an Agent may request.Defaults to 1 day.
- Parameters:
timeout- maximum storage lifetime
-
doPreExecute
- Overrides:
doPreExecutein classAbstractRevocationAction
-
doExecute
- Overrides:
doExecutein classAbstractProfileAction
-
doRevocation
Store a revocation record if configured to do so.- Parameters:
profileRequestContext- profile request context- Returns:
- true iff revocation succeeded or was not configured
-
getStorageLifetime
Get Agent-supplied storage lifetime in seconds, bounded by configured maximum.- Returns:
- effective lifetime in seconds
-