Class AddStateHandler
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.messaging.handler.AbstractMessageHandler
net.shibboleth.idp.plugin.authn.oidc.rp.messaging.impl.AbstractOIDCAuthenticationRequestMessageHandler
net.shibboleth.idp.plugin.authn.oidc.rp.messaging.impl.AddStateHandler
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,MessageHandler
Add state to the authentication request URL and the request object claims (if present).
By default this is generated by concatenating the Hex value of the spring webflow execution
key with a secure random 32 character nonce.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.LoggerLogger.private static final StringThe 'state' claim name.private Function<MessageContext,String> Function to create a suitable 'state' to add to the authentication request. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoInvoke(MessageContext messageContext) voidsetStateGenerationStrategy(Function<MessageContext, String> strategy) Set the creation strategy used to compute the 'state'.Methods inherited from class net.shibboleth.idp.plugin.authn.oidc.rp.messaging.impl.AbstractOIDCAuthenticationRequestMessageHandler
doPreInvoke, getAuthenticationRequest, getOutboundMessageContext, setAuthenticationRequestLookupStrategy, setOutboundMessageHandlerContextLookupStrategyMethods inherited from class org.opensaml.messaging.handler.AbstractMessageHandler
doPostInvoke, doPostInvoke, getActivationCondition, getLogPrefix, invoke, isPreInvokeCalled, setActivationConditionMethods 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
-
STATE_CLAIM
The 'state' claim name.- See Also:
-
log
@Nonnull private final org.slf4j.Logger logLogger. -
stateGenerationStrategy
Function to create a suitable 'state' to add to the authentication request.
-
-
Constructor Details
-
AddStateHandler
public AddStateHandler()Constructor.
-
-
Method Details
-
setStateGenerationStrategy
Set the creation strategy used to compute the 'state'.- Parameters:
strategy- the creation strategy
-
doInvoke
- Specified by:
doInvokein classAbstractMessageHandler- Throws:
MessageHandlerException
-