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
OIDCPeerEntityContextto the inbound message context.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate 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.LoggerClass logger.private StringThe identifier of the OP/RP to base the inbound context on.Strategy to lookup the identifier of the OP/RP to base the inbound context on. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoExecute(org.opensaml.profile.context.ProfileRequestContext profileRequestContext) protected voidprotected booleandoPreExecute(org.opensaml.profile.context.ProfileRequestContext profileRequestContext) voidsetAddToExistingInboundMessageContext(boolean flag) Set whether to append any defined subcontexts to the existing inbound message context, or to a new one.voidsetAddToExistingInboundMessageContextPredicate(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.voidsetRelyingPartyLookupStrategy(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, setProfileContextLookupStrategyMethods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
getActivationCondition, setActivationConditionMethods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, ensureHttpServletRequest, ensureHttpServletResponse, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, isPreExecuteCalled, setHttpServletRequestSupplier, setHttpServletResponseSupplierMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, 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.InitializableComponent
initialize, isInitialized
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
relyingPartyLookupStrategy
@NonnullAfterInit private Function<org.opensaml.profile.context.ProfileRequestContext,String> relyingPartyLookupStrategyStrategy to lookup the identifier of the OP/RP to base the inbound context on. -
relyingPartyId
The identifier of the OP/RP to base the inbound context on. -
addToExistingInboundMessageContextPredicate
@Nonnull private Predicate<org.opensaml.profile.context.ProfileRequestContext> addToExistingInboundMessageContextPredicateShould 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:
doInitializein classnet.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:
doPreExecutein classorg.opensaml.profile.action.AbstractConditionalProfileAction
-
doExecute
protected void doExecute(@Nonnull org.opensaml.profile.context.ProfileRequestContext profileRequestContext) - Overrides:
doExecutein classorg.opensaml.profile.action.AbstractProfileAction
-