Package net.shibboleth.sp.state.impl
Class PassthroughStateManager
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.sp.state.AbstractStateManager
net.shibboleth.sp.state.impl.PassthroughStateManager
- All Implemented Interfaces:
Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent,StateManager
StateManager implemented by returning data encoded as is.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringdoPreserve(Agent agent, Application application, String data, boolean sealed) Subclasses implement this method to preserve the transformed data in whatever way is necessary and return a token.protected StringdoRecover(Agent agent, Application application, String stateToken, boolean sealed) Subclasses implement this method to recover the stored data in whatever way is necessary and return the supplied data string as a successful result.Methods inherited from class net.shibboleth.sp.state.AbstractStateManager
doInitialize, generateToken, getClientAddress, getDataSealer, getExpiration, getIdentifierGenerationStrategy, getReplayCache, preserveToStateToken, recoverFromStateToken, setDataSealer, setExpiration, setHttpServletRequestSupplier, setIdentifierGenerationStrategy, setObjectMapper, setPrefix, setReplayCacheMethods 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
-
Constructor Details
-
PassthroughStateManager
public PassthroughStateManager()Constructor.
-
-
Method Details
-
doPreserve
@Nonnull protected String doPreserve(@Nonnull Agent agent, @Nonnull Application application, @Nonnull String data, boolean sealed) throws IOException Subclasses implement this method to preserve the transformed data in whatever way is necessary and return a token.- Specified by:
doPreservein classAbstractStateManager- Parameters:
agent- agent owning the stateapplication- application owning the statedata- data to preservesealed- whether the data was sealed (and thus base64-encoded)- Returns:
- the state token
- Throws:
IOException- if an error occurs
-
doRecover
@Nullable protected String doRecover(@Nonnull Agent agent, @Nonnull Application application, @Nonnull @NotEmpty String stateToken, boolean sealed) throws IOException Subclasses implement this method to recover the stored data in whatever way is necessary and return the supplied data string as a successful result.The implementation should ensure when possible that this method works only once for a given state token.
Subclasses may assume that the state token inputs they receive will have been returned by them via the
AbstractStateManager.doPreserve(Agent, Application, String, boolean)method.- Specified by:
doRecoverin classAbstractStateManager- Parameters:
agent- agent owning the stateapplication- application owning the statestateToken- the state token to map from/clearsealed- whether the data was sealed (and thus base64-encoded)- Returns:
- the recovered data, or null if unable to recover without underlying cause
- Throws:
IOException- if an error occurs
-