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-validated
Assertion
WS-Security token,
and populate the LibertySSOSContext
.
The default token strategy is to resolve the first instance of SAML20AssertionToken
present in the inbound WSSecurityContext
which has a validation status of
Token.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 class
PopulateLibertyContext.TokenStrategy
Default strategy for resolving the assertion token to process. -
Field Summary
Fields Modifier and Type Field Description private SAML20AssertionToken
assertionToken
The SAML 2 Assertion token being processed.private Function<ProfileRequestContext,SAML20AssertionToken>
assertionTokenStrategy
Function used to resolve the assertion token to process.private Function<ProfileRequestContext,LibertySSOSContext>
libertyContextLookupStrategy
Function used to resolve the Liberty context to populate.private org.slf4j.Logger
log
Logger.private LibertySSOSContext
ssosContext
Liberty context to populate. -
Constructor Summary
Constructors Constructor Description PopulateLibertyContext()
Constructor. -
Method Summary
Modifier and Type Method Description protected void
doExecute(ProfileRequestContext profileRequestContext)
protected boolean
doPreExecute(ProfileRequestContext profileRequestContext)
void
setAssertionTokenStrategy(Function<ProfileRequestContext,SAML20AssertionToken> strategy)
Set the strategy used to locate the requester ID for canonicalization.void
setLibertyContextLookupStrategy(Function<ProfileRequestContext,LibertySSOSContext> strategy)
Set the strategy used to locate theLibertySSOSContext
to 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 Details
-
log
@Nonnull private org.slf4j.Logger logLogger. -
assertionTokenStrategy
Function used to resolve the assertion token to process. -
libertyContextLookupStrategy
Function used to resolve the Liberty context to populate. -
assertionToken
The SAML 2 Assertion token being processed. -
ssosContext
Liberty context to populate.
-
-
Constructor Details
-
PopulateLibertyContext
public PopulateLibertyContext()Constructor.
-
-
Method Details
-
setLibertyContextLookupStrategy
public void setLibertyContextLookupStrategy(@Nonnull Function<ProfileRequestContext,LibertySSOSContext> strategy)Set the strategy used to locate theLibertySSOSContext
to 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
- Overrides:
doPreExecute
in classAbstractConditionalProfileAction
-
doExecute
- Overrides:
doExecute
in classAbstractProfileAction
-