Class AddAuthenticationStatementToAssertion
- 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.authn.AbstractAuthenticationAction
-
- net.shibboleth.idp.saml.profile.impl.BaseAddAuthenticationStatementToAssertion
-
- net.shibboleth.idp.saml.saml1.profile.impl.AddAuthenticationStatementToAssertion
-
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
public class AddAuthenticationStatementToAssertion extends BaseAddAuthenticationStatementToAssertion
Action that builds anAuthenticationStatementand adds it to anAssertionreturned by a lookup strategy, by default in theInOutOperationContext.getOutboundMessageContext().If no
Responseexists, then anAssertiondirectly in the outbound message context will be used or createdA constructed
Assertionwill have its ID, IssueInstant, Issuer, and Version properties set. The issuer is based onRelyingPartyConfiguration.getResponderId(ProfileRequestContext).The
AuthenticationStatementwill have its authentication instant set, based onAuthenticationResult.getAuthenticationInstant()viaAuthenticationContext.getAuthenticationResult(). The method property will be set viaRequestedPrincipalContext.getMatchingPrincipal(), or via an injected or defaulted function that obtains anAuthenticationMethodPrincipalfrom the profile context.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classAddAuthenticationStatementToAssertion.AssertionStrategyDefault strategy for obtaining assertion to modify.
-
Field Summary
Fields Modifier and Type Field Description private Function<ProfileRequestContext,Assertion>assertionLookupStrategyStrategy used to locate theAssertionto operate on.private IdentifierGenerationStrategyidGeneratorThe generator to use.private org.slf4j.LoggerlogClass logger.private Function<ProfileRequestContext,AuthenticationMethodPrincipal>methodLookupStrategyStrategy used to determine the AuthenticationMethod attribute.
-
Constructor Summary
Constructors Constructor Description AddAuthenticationStatementToAssertion()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private AuthenticationStatementbuildAuthenticationStatement(ProfileRequestContext profileRequestContext, RequestedPrincipalContext requestedPrincipalContext)Build theAuthenticationStatementto be added to theResponse.protected voiddoExecute(ProfileRequestContext profileRequestContext, AuthenticationContext authenticationContext)protected voiddoInitialize()voidsetAssertionLookupStrategy(Function<ProfileRequestContext,Assertion> strategy)Set the strategy used to locate theAssertionto operate on.voidsetAuthenticationMethodLookupStrategy(Function<ProfileRequestContext,AuthenticationMethodPrincipal> strategy)Set the strategy function to use to obtain the authentication method to use.-
Methods inherited from class net.shibboleth.idp.saml.profile.impl.BaseAddAuthenticationStatementToAssertion
doPreExecute, getAddressLookupStrategy, getAuthenticationResult, getIdGenerator, getIssuerId, isStatementInOwnAssertion, setAddressLookupStrategy, setIdentifierGeneratorLookupStrategy, setIssuerLookupStrategy, setStatementInOwnAssertion
-
Methods inherited from class net.shibboleth.idp.authn.AbstractAuthenticationAction
doExecute, doPreExecute, setAuthenticationContextLookupStrategy
-
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, 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.
-
assertionLookupStrategy
@NonnullAfterInit private Function<ProfileRequestContext,Assertion> assertionLookupStrategy
Strategy used to locate theAssertionto operate on.
-
methodLookupStrategy
@NonnullAfterInit private Function<ProfileRequestContext,AuthenticationMethodPrincipal> methodLookupStrategy
Strategy used to determine the AuthenticationMethod attribute.
-
idGenerator
@Nullable private IdentifierGenerationStrategy idGenerator
The generator to use.
-
-
Method Detail
-
setAssertionLookupStrategy
public void setAssertionLookupStrategy(@Nonnull Function<ProfileRequestContext,Assertion> strategy)Set the strategy used to locate theAssertionto operate on.- Parameters:
strategy- strategy used to locate theAssertionto operate on
-
setAuthenticationMethodLookupStrategy
public void setAuthenticationMethodLookupStrategy(@Nonnull Function<ProfileRequestContext,AuthenticationMethodPrincipal> strategy)Set the strategy function to use to obtain the authentication method to use.- Parameters:
strategy- authentication method lookup strategy
-
doInitialize
protected void doInitialize() throws ComponentInitializationException- Overrides:
doInitializein classBaseAddAuthenticationStatementToAssertion- Throws:
ComponentInitializationException
-
doExecute
protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull AuthenticationContext authenticationContext)- Overrides:
doExecutein classAbstractAuthenticationAction
-
buildAuthenticationStatement
@Nonnull private AuthenticationStatement buildAuthenticationStatement(@Nonnull ProfileRequestContext profileRequestContext, @Nullable RequestedPrincipalContext requestedPrincipalContext)
Build theAuthenticationStatementto be added to theResponse.- Parameters:
profileRequestContext- current request contextrequestedPrincipalContext- context specifying request requirements for authn method- Returns:
- the authentication statement
-
-