Class PrepareOIDCInboundMessageContext
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- org.opensaml.profile.action.AbstractProfileAction
-
- org.opensaml.profile.action.AbstractConditionalProfileAction
-
- net.shibboleth.idp.profile.AbstractProfileAction
-
- net.shibboleth.idp.plugin.authn.oidc.rp.impl.PrepareOIDCInboundMessageContext
-
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
public class PrepareOIDCInboundMessageContext extends AbstractProfileAction
Action that adds an inboundMessageContextand aOIDCPeerEntityContextto theProfileRequestContextbased on the identity of a relying party, by default from theAuthenticationContext.getAuthenticatingAuthority().If addToExistingInboundMessageContextPredicate is true, the
OIDCPeerEntityContextis 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
Fields Modifier and Type Field Description private Predicate<ProfileRequestContext>addToExistingInboundMessageContextPredicateShould the peer entity context be added to an existing inbound message context or not.private StringidentifierThe identifier of the OP/RP to base the inbound context on.private Function<ProfileRequestContext,String>identifierLookupStrategyStrategy to lookup the identifier of the OP/RP to base the inbound context on.private org.slf4j.LoggerlogClass logger.
-
Constructor Summary
Constructors Constructor Description PrepareOIDCInboundMessageContext()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoExecute(ProfileRequestContext profileRequestContext)protected voiddoInitialize()protected booleandoPreExecute(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<ProfileRequestContext> predicate)Set a predicate to determine whether to append any defined subcontexts to the existing inbound message context, or to a new one.voidsetIdentiferLookupStrategy(Function<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, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, setHttpServletRequest, setHttpServletRequestSupplier, setHttpServletResponse, setHttpServletResponseSupplier
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
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 net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitialized
-
-
-
-
Field Detail
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
identifierLookupStrategy
@NonnullAfterInit private Function<ProfileRequestContext,String> identifierLookupStrategy
Strategy to lookup the identifier of the OP/RP to base the inbound context on.
-
identifier
@Nullable private String identifier
The identifier of the OP/RP to base the inbound context on.
-
addToExistingInboundMessageContextPredicate
@Nonnull private Predicate<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.
-
-
Method Detail
-
doInitialize
protected void doInitialize() throws ComponentInitializationException- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
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<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.
-
setIdentiferLookupStrategy
public void setIdentiferLookupStrategy(@Nonnull Function<ProfileRequestContext,String> strategy)Set the lookup strategy to identify the OP/RP.- Parameters:
strategy- lookup strategy
-
doPreExecute
protected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext)- Overrides:
doPreExecutein classAbstractConditionalProfileAction
-
doExecute
protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)- Overrides:
doExecutein classAbstractProfileAction
-
-