Class InitializeRelyingPartyContextFromOIDCPeer

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.InitializeRelyingPartyContextFromOIDCPeer
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 InitializeRelyingPartyContextFromOIDCPeer extends net.shibboleth.idp.profile.AbstractProfileAction
Action that adds a RelyingPartyContext to the current ProfileRequestContext tree via a creation function. The context is populated via a lookup strategy to locate a OIDCPeerEntityContext, by default via InOutOperationContext.getInboundMessageContext().
Event:
EventIds.INVALID_MSG_CTX, EventIds.INVALID_PROFILE_CTX, IdPEventIds.INVALID_RELYING_PARTY_CTX
Postcondition:
ProfileRequestContext.getSubcontext(RelyingPartyContext.class) != null with relying party id set.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final org.slf4j.Logger
    Class logger.
    private Function<org.opensaml.profile.context.ProfileRequestContext,net.shibboleth.oidc.metadata.context.OIDCProviderMetadataContext>
    Strategy that will return OIDCMetadataContext.
    private Function<org.opensaml.profile.context.ProfileRequestContext,net.shibboleth.oidc.profile.messaging.context.OIDCPeerEntityContext>
    Strategy used to look up the OIDCPeerEntityContext to draw from.
    private net.shibboleth.oidc.profile.messaging.context.OIDCPeerEntityContext
    OIDC peer entity context to populate from.
    private String
    The stashed identifier of the OIDC entity.
    private Function<org.opensaml.profile.context.ProfileRequestContext,net.shibboleth.profile.context.RelyingPartyContext>
    Strategy that will return or create a RelyingPartyContext.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    doExecute(org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
     
    protected boolean
    doPreExecute(org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
     
    void
    setOidcProviderMetadataContextLookupStrategy(Function<org.opensaml.profile.context.ProfileRequestContext,net.shibboleth.oidc.metadata.context.OIDCProviderMetadataContext> strategy)
    Set the strategy used to return the OIDCProviderMetadataContext.
    void
    setPeerEntityContextLookupStrategy(Function<org.opensaml.profile.context.ProfileRequestContext,net.shibboleth.oidc.profile.messaging.context.OIDCPeerEntityContext> strategy)
    Set the strategy used to look up the OIDCPeerEntityContext to draw from.
    void
    setRelyingPartyContextCreationStrategy(Function<org.opensaml.profile.context.ProfileRequestContext,net.shibboleth.profile.context.RelyingPartyContext> strategy)
    Set the strategy used to return or create the RelyingPartyContext .

    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, doInitialize, 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.
    • relyingPartyContextCreationStrategy

      @Nonnull private Function<org.opensaml.profile.context.ProfileRequestContext,net.shibboleth.profile.context.RelyingPartyContext> relyingPartyContextCreationStrategy
      Strategy that will return or create a RelyingPartyContext.
    • oidcProviderMetadataContextLookupStrategy

      @Nonnull private Function<org.opensaml.profile.context.ProfileRequestContext,net.shibboleth.oidc.metadata.context.OIDCProviderMetadataContext> oidcProviderMetadataContextLookupStrategy
      Strategy that will return OIDCMetadataContext.
    • peerEntityCtx

      @NonnullBeforeExec private net.shibboleth.oidc.profile.messaging.context.OIDCPeerEntityContext peerEntityCtx
      OIDC peer entity context to populate from.
    • peerEntityContextLookupStrategy

      @Nonnull private Function<org.opensaml.profile.context.ProfileRequestContext,net.shibboleth.oidc.profile.messaging.context.OIDCPeerEntityContext> peerEntityContextLookupStrategy
      Strategy used to look up the OIDCPeerEntityContext to draw from.
    • peerIdentifier

      @NonnullBeforeExec private String peerIdentifier
      The stashed identifier of the OIDC entity.
  • Constructor Details

    • InitializeRelyingPartyContextFromOIDCPeer

      public InitializeRelyingPartyContextFromOIDCPeer()
      Constructor.
  • Method Details

    • setPeerEntityContextLookupStrategy

      public void setPeerEntityContextLookupStrategy(@Nonnull Function<org.opensaml.profile.context.ProfileRequestContext,net.shibboleth.oidc.profile.messaging.context.OIDCPeerEntityContext> strategy)
      Set the strategy used to look up the OIDCPeerEntityContext to draw from.
      Parameters:
      strategy - strategy used to look up the OIDCPeerEntityContext
    • setRelyingPartyContextCreationStrategy

      public void setRelyingPartyContextCreationStrategy(@Nonnull Function<org.opensaml.profile.context.ProfileRequestContext,net.shibboleth.profile.context.RelyingPartyContext> strategy)
      Set the strategy used to return or create the RelyingPartyContext .
      Parameters:
      strategy - creation strategy
    • setOidcProviderMetadataContextLookupStrategy

      public void setOidcProviderMetadataContextLookupStrategy(@Nonnull Function<org.opensaml.profile.context.ProfileRequestContext,net.shibboleth.oidc.metadata.context.OIDCProviderMetadataContext> strategy)
      Set the strategy used to return the OIDCProviderMetadataContext.
      Parameters:
      strategy - The 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