Class AddStateHandler
- java.lang.Object
-
- net.shibboleth.utilities.java.support.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
public class AddStateHandler extends AbstractOIDCAuthenticationRequestMessageHandler
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
Fields Modifier and Type Field Description private org.slf4j.LoggerlogLogger.private static StringSTATE_CLAIMThe 'state' claim name.private Function<MessageContext,String>stateGenerationStrategyFunction to create a suitable 'state' to add to the authentication request.
-
Constructor Summary
Constructors Constructor Description AddStateHandler()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoInitialize()protected 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, setOutboundMessageHandlerContextLookupStrategy
-
Methods inherited from class org.opensaml.messaging.handler.AbstractMessageHandler
doPostInvoke, doPostInvoke, getActivationCondition, getLogPrefix, invoke, setActivationCondition
-
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.InitializableComponent
initialize, isInitialized
-
-
-
-
Field Detail
-
STATE_CLAIM
@Nonnull private static final String STATE_CLAIM
The 'state' claim name.- See Also:
- Constant Field Values
-
log
@Nonnull private final org.slf4j.Logger log
Logger.
-
stateGenerationStrategy
@Nonnull private Function<MessageContext,String> stateGenerationStrategy
Function to create a suitable 'state' to add to the authentication request.
-
-
Method Detail
-
setStateGenerationStrategy
public void setStateGenerationStrategy(@Nullable Function<MessageContext,String> strategy)Set the creation strategy used to compute the 'state'.- Parameters:
strategy- the creation strategy
-
doInitialize
protected void doInitialize() throws ComponentInitializationException- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
doInvoke
protected void doInvoke(@Nonnull MessageContext messageContext) throws MessageHandlerException- Specified by:
doInvokein classAbstractMessageHandler- Throws:
MessageHandlerException
-
-