Class AuthenticationRequestStateForStorageStrategy
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.sp.oidc.profile.impl.AuthenticationRequestStateForStorageStrategy
- All Implemented Interfaces:
Function<org.opensaml.profile.context.ProfileRequestContext,,AuthenticationRequestStateData> net.shibboleth.shared.component.Component,net.shibboleth.shared.component.DestructableComponent,net.shibboleth.shared.component.IdentifiableComponent,net.shibboleth.shared.component.IdentifiedComponent,net.shibboleth.shared.component.InitializableComponent
public class AuthenticationRequestStateForStorageStrategy
extends net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
implements Function<org.opensaml.profile.context.ProfileRequestContext,AuthenticationRequestStateData>
A
Function that produces StateData representing authentication request state that is required
for validating the authentication response. This can be stored in a way that can be recovered later when the
response is received.
It is important that this information is stored in a way that is protected from modification by the client, as tampering with this information may allow an attacker to forge authentication responses.
If an authentication authority is not available, or the authentication request
is not available, null will be returned. This will ultimately prevent the authentication response
from being validated, therefore the calling action may wish to terminate the authentication process before a request
is made.
-
Field Summary
FieldsModifier and TypeFieldDescriptionStrategy to locate authentication authority, that is the issuer of the eventual authentication response.private Function<org.opensaml.profile.context.ProfileRequestContext,net.shibboleth.oidc.profile.core.OIDCAuthenticationRequest> Strategy to locate the authentication request.private final org.slf4j.LoggerClass logger. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(org.opensaml.profile.context.ProfileRequestContext prc) protected voidvoidsetAuthenticationAuthorityLookupStrategy(Function<org.opensaml.profile.context.ProfileRequestContext, String> strategy) Set the authentication authority lookup strategy to use.voidsetAuthenticationRequestLookupStrategy(Function<org.opensaml.profile.context.ProfileRequestContext, net.shibboleth.oidc.profile.core.OIDCAuthenticationRequest> strategy) Set the authentication request lookup strategy to use.Methods 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
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
authenticationAuthorityLookupStrategy
@NonnullAfterInit private Function<org.opensaml.profile.context.ProfileRequestContext,String> authenticationAuthorityLookupStrategyStrategy to locate authentication authority, that is the issuer of the eventual authentication response. -
authenticationRequestLookupStrategy
@NonnullAfterInit private Function<org.opensaml.profile.context.ProfileRequestContext,net.shibboleth.oidc.profile.core.OIDCAuthenticationRequest> authenticationRequestLookupStrategyStrategy to locate the authentication request.
-
-
Constructor Details
-
AuthenticationRequestStateForStorageStrategy
public AuthenticationRequestStateForStorageStrategy()
-
-
Method Details
-
doInitialize
protected void doInitialize() throws net.shibboleth.shared.component.ComponentInitializationException- Overrides:
doInitializein classnet.shibboleth.shared.component.AbstractIdentifiedInitializableComponent- Throws:
net.shibboleth.shared.component.ComponentInitializationException
-
setAuthenticationRequestLookupStrategy
public void setAuthenticationRequestLookupStrategy(@Nonnull Function<org.opensaml.profile.context.ProfileRequestContext, net.shibboleth.oidc.profile.core.OIDCAuthenticationRequest> strategy) Set the authentication request lookup strategy to use.- Parameters:
strategy- the strategy
-
setAuthenticationAuthorityLookupStrategy
public void setAuthenticationAuthorityLookupStrategy(@Nonnull Function<org.opensaml.profile.context.ProfileRequestContext, String> strategy) Set the authentication authority lookup strategy to use.- Parameters:
strategy- the strategy.
-
apply
@Nullable public AuthenticationRequestStateData apply(@Nullable org.opensaml.profile.context.ProfileRequestContext prc) - Specified by:
applyin interfaceFunction<org.opensaml.profile.context.ProfileRequestContext,AuthenticationRequestStateData>
-