Class PrepareOIDCInboundMessageContext

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.profile.action.AbstractProfileAction
org.opensaml.profile.action.AbstractConditionalProfileAction
net.shibboleth.idp.profile.AbstractProfileAction
net.shibboleth.sp.oidc.profile.impl.PrepareOIDCInboundMessageContext
All Implemented Interfaces:
net.shibboleth.shared.component.Component, net.shibboleth.shared.component.DestructableComponent, net.shibboleth.shared.component.InitializableComponent, org.opensaml.profile.action.ProfileAction, Aware, MessageSource, MessageSourceAware, Action

public class PrepareOIDCInboundMessageContext extends net.shibboleth.idp.profile.AbstractProfileAction
Action that adds an inbound MessageContext and a OIDCPeerEntityContext to the ProfileRequestContext based on the identity of a relying party.

If addToExistingInboundMessageContextPredicate is true, the OIDCPeerEntityContext is added as a subcontext to any existing inbound message context.

Event:
EventIds.PROCEED_EVENT_ID, EventIds.INVALID_PROFILE_CTX
Postcondition:
Add an OIDCPeerEntityContext to the inbound message context.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private Predicate<org.opensaml.profile.context.ProfileRequestContext>
    Should the peer entity context be added to an existing inbound message context or not.
    private final org.slf4j.Logger
    Class logger.
    private String
    The identifier of the OP/RP to base the inbound context on.
    private Function<org.opensaml.profile.context.ProfileRequestContext,String>
    Strategy to lookup the identifier of the OP/RP to base the inbound context on.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    doExecute(org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
     
    protected void
     
    protected boolean
    doPreExecute(org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
     
    void
    Set whether to append any defined subcontexts to the existing inbound message context, or to a new one.
    void
    setAddToExistingInboundMessageContextPredicate(Predicate<org.opensaml.profile.context.ProfileRequestContext> predicate)
    Set a predicate to determine whether to append any defined subcontexts to the existing inbound message context, or to a new one.
    void
    setRelyingPartyLookupStrategy(Function<org.opensaml.profile.context.ProfileRequestContext,String> strategy)
    Set the lookup strategy to identify the OP/RP.

    Methods inherited from class net.shibboleth.idp.profile.AbstractProfileAction

    doExecute, execute, getBean, getBean, getMessage, getMessage, getMessage, getParameter, getParameter, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategy

    Methods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction

    getActivationCondition, setActivationCondition

    Methods inherited from class org.opensaml.profile.action.AbstractProfileAction

    doPostExecute, doPostExecute, ensureHttpServletRequest, ensureHttpServletResponse, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, isPreExecuteCalled, setHttpServletRequestSupplier, setHttpServletResponseSupplier

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

    checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, 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.shared.component.InitializableComponent

    initialize, isInitialized
  • Field Details

    • log

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

      @NonnullAfterInit private Function<org.opensaml.profile.context.ProfileRequestContext,String> relyingPartyLookupStrategy
      Strategy to lookup the identifier of the OP/RP to base the inbound context on.
    • relyingPartyId

      @Nullable private String relyingPartyId
      The identifier of the OP/RP to base the inbound context on.
    • addToExistingInboundMessageContextPredicate

      @Nonnull private Predicate<org.opensaml.profile.context.ProfileRequestContext> addToExistingInboundMessageContextPredicate
      Should the peer entity context be added to an existing inbound message context or not. If not, a new inbound message context is created before the peer entity context is added. Defaults to false.
  • Constructor Details

    • PrepareOIDCInboundMessageContext

      public PrepareOIDCInboundMessageContext()
      Constructor.
  • Method Details

    • doInitialize

      protected void doInitialize() throws net.shibboleth.shared.component.ComponentInitializationException
      Overrides:
      doInitialize in class net.shibboleth.shared.component.AbstractInitializableComponent
      Throws:
      net.shibboleth.shared.component.ComponentInitializationException
    • setAddToExistingInboundMessageContext

      public void setAddToExistingInboundMessageContext(boolean flag)
      Set whether to append any defined subcontexts to the existing inbound message context, or to a new one.
      Parameters:
      flag - the flag to set.
    • setAddToExistingInboundMessageContextPredicate

      public void setAddToExistingInboundMessageContextPredicate(@Nonnull Predicate<org.opensaml.profile.context.ProfileRequestContext> predicate)
      Set a predicate to determine whether to append any defined subcontexts to the existing inbound message context, or to a new one.
      Parameters:
      predicate - the predicate to set.
    • setRelyingPartyLookupStrategy

      public void setRelyingPartyLookupStrategy(@Nonnull Function<org.opensaml.profile.context.ProfileRequestContext,String> strategy)
      Set the lookup strategy to identify the OP/RP.
      Parameters:
      strategy - lookup strategy
    • doPreExecute

      protected boolean doPreExecute(@Nonnull org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
      Overrides:
      doPreExecute in class org.opensaml.profile.action.AbstractConditionalProfileAction
    • doExecute

      protected void doExecute(@Nonnull org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
      Overrides:
      doExecute in class org.opensaml.profile.action.AbstractProfileAction