Class PopulateLibertyContext
- 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.saml.saml2.profile.delegation.impl.PopulateLibertyContext
-
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
public class PopulateLibertyContext extends AbstractProfileAction
Locate a pre-validatedAssertionWS-Security token, and populate theLibertySSOSContext.The default token strategy is to resolve the first instance of
SAML20AssertionTokenpresent in the inboundWSSecurityContextwhich has a validation status ofToken.ValidationStatus.VALID- Event:
AuthnEventIds.NO_CREDENTIALS- Precondition:
assertionTokenStrategy.apply() != null
- Postcondition:
profileRequestContext.getSubcontext(LibertySSOSContext.class) != null
,LibertySSOSContext.getAttestedToken() != null
,LibertySSOSContext.getAttestedSubjectConfirmationMethod != null
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classPopulateLibertyContext.TokenStrategyDefault strategy for resolving the assertion token to process.
-
Field Summary
Fields Modifier and Type Field Description private SAML20AssertionTokenassertionTokenThe SAML 2 Assertion token being processed.private Function<ProfileRequestContext,SAML20AssertionToken>assertionTokenStrategyFunction used to resolve the assertion token to process.private Function<ProfileRequestContext,LibertySSOSContext>libertyContextLookupStrategyFunction used to resolve the Liberty context to populate.private org.slf4j.LoggerlogLogger.private LibertySSOSContextssosContextLiberty context to populate.
-
Constructor Summary
Constructors Constructor Description PopulateLibertyContext()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoExecute(ProfileRequestContext profileRequestContext)protected booleandoPreExecute(ProfileRequestContext profileRequestContext)voidsetAssertionTokenStrategy(Function<ProfileRequestContext,SAML20AssertionToken> strategy)Set the strategy used to locate the requester ID for canonicalization.voidsetLibertyContextLookupStrategy(Function<ProfileRequestContext,LibertySSOSContext> strategy)Set the strategy used to locate theLibertySSOSContextto populate.-
Methods inherited from class net.shibboleth.idp.profile.AbstractProfileAction
doExecute, execute, getMessage, getMessage, getMessage, 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, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponse
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, doInitialize, 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 org.slf4j.Logger log
Logger.
-
assertionTokenStrategy
@Nonnull private Function<ProfileRequestContext,SAML20AssertionToken> assertionTokenStrategy
Function used to resolve the assertion token to process.
-
libertyContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,LibertySSOSContext> libertyContextLookupStrategy
Function used to resolve the Liberty context to populate.
-
assertionToken
private SAML20AssertionToken assertionToken
The SAML 2 Assertion token being processed.
-
ssosContext
private LibertySSOSContext ssosContext
Liberty context to populate.
-
-
Method Detail
-
setLibertyContextLookupStrategy
public void setLibertyContextLookupStrategy(@Nonnull Function<ProfileRequestContext,LibertySSOSContext> strategy)Set the strategy used to locate theLibertySSOSContextto populate.- Parameters:
strategy- lookup strategy
-
setAssertionTokenStrategy
public void setAssertionTokenStrategy(@Nonnull Function<ProfileRequestContext,SAML20AssertionToken> strategy)Set the strategy used to locate the requester ID for canonicalization.- Parameters:
strategy- lookup strategy
-
doPreExecute
protected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext)- Overrides:
doPreExecutein classAbstractConditionalProfileAction
-
doExecute
protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)- Overrides:
doExecutein classAbstractProfileAction
-
-