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

    Fields
    Modifier and Type
    Field
    Description
    private Function<org.opensaml.profile.context.ProfileRequestContext,String>
    Strategy 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.Logger
    Class logger.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(org.opensaml.profile.context.ProfileRequestContext prc)
    protected void
    void
    setAuthenticationAuthorityLookupStrategy(Function<org.opensaml.profile.context.ProfileRequestContext,String> strategy)
    Set the authentication authority lookup strategy to use.
    void
    setAuthenticationRequestLookupStrategy(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

    setId

    Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent

    ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException

    Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

    checkComponentActive, checkSetterPreconditions, 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 java.util.function.Function

    andThen, compose

    Methods inherited from interface net.shibboleth.shared.component.IdentifiedComponent

    getId
  • Field Details

    • log

      @Nonnull private final org.slf4j.Logger log
      Class logger.
    • authenticationAuthorityLookupStrategy

      @NonnullAfterInit private Function<org.opensaml.profile.context.ProfileRequestContext,String> authenticationAuthorityLookupStrategy
      Strategy 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> authenticationRequestLookupStrategy
      Strategy to locate the authentication request.
  • Constructor Details

    • AuthenticationRequestStateForStorageStrategy

      public AuthenticationRequestStateForStorageStrategy()
  • Method Details

    • doInitialize

      protected void doInitialize() throws net.shibboleth.shared.component.ComponentInitializationException
      Overrides:
      doInitialize in class net.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:
      apply in interface Function<org.opensaml.profile.context.ProfileRequestContext,AuthenticationRequestStateData>