public class AddAuthenticationStatementToAssertion extends BaseAddAuthenticationStatementToAssertion
AuthenticationStatement and adds it to an Assertion returned by a lookup
strategy, by default in the InOutOperationContext.getOutboundMessageContext().
If no Response exists, then an Assertion directly in the outbound message context will
be used or created
A constructed Assertion will have its ID, IssueInstant, Issuer, and Version properties set.
The issuer is based on RelyingPartyConfiguration.getResponderId().
The AuthenticationStatement will have its authentication instant set, based on
AuthenticationResult.getAuthenticationInstant()
via AuthenticationContext.getAuthenticationResult().
The method property will be set via RequestedPrincipalContext.getMatchingPrincipal(), or via an injected
or defaulted function that obtains an AuthenticationMethodPrincipal from the profile context.
EventIds.PROCEED_EVENT_ID, EventIds.INVALID_PROFILE_CTX, EventIds.INVALID_MSG_CTX, AuthnEventIds.INVALID_AUTHN_CTX| Modifier and Type | Class and Description |
|---|---|
private class |
AddAuthenticationStatementToAssertion.AssertionStrategy
Default strategy for obtaining assertion to modify.
|
| Modifier and Type | Field and Description |
|---|---|
private Function<org.opensaml.profile.context.ProfileRequestContext,org.opensaml.saml.saml1.core.Assertion> |
assertionLookupStrategy
Strategy used to locate the
Assertion to operate on. |
private IdentifierGenerationStrategy |
idGenerator
The generator to use.
|
private org.slf4j.Logger |
log
Class logger.
|
private Function<org.opensaml.profile.context.ProfileRequestContext,AuthenticationMethodPrincipal> |
methodLookupStrategy
Strategy used to determine the AuthenticationMethod attribute.
|
| Constructor and Description |
|---|
AddAuthenticationStatementToAssertion() |
| Modifier and Type | Method and Description |
|---|---|
private org.opensaml.saml.saml1.core.AuthenticationStatement |
buildAuthenticationStatement(org.opensaml.profile.context.ProfileRequestContext profileRequestContext,
RequestedPrincipalContext requestedPrincipalContext)
Build the
AuthenticationStatement to be added to the Response. |
protected void |
doExecute(org.opensaml.profile.context.ProfileRequestContext profileRequestContext,
AuthenticationContext authenticationContext) |
protected void |
doInitialize() |
void |
setAssertionLookupStrategy(Function<org.opensaml.profile.context.ProfileRequestContext,org.opensaml.saml.saml1.core.Assertion> strategy)
Set the strategy used to locate the
Assertion to operate on. |
void |
setAuthenticationMethodLookupStrategy(Function<org.opensaml.profile.context.ProfileRequestContext,AuthenticationMethodPrincipal> strategy)
Set the strategy function to use to obtain the authentication method to use.
|
doPreExecute, getAuthenticationResult, getIdGenerator, getIssuerId, isStatementInOwnAssertion, setIdentifierGeneratorLookupStrategy, setIssuerLookupStrategy, setStatementInOwnAssertiondoExecute, doPreExecute, setLookupStrategydoExecute, execute, getMessage, getMessage, getMessage, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategygetActivationCondition, setActivationConditiondoPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponsedestroy, doDestroy, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitialize, isInitialized@Nonnull private final org.slf4j.Logger log
@NonnullAfterInit private Function<org.opensaml.profile.context.ProfileRequestContext,org.opensaml.saml.saml1.core.Assertion> assertionLookupStrategy
Assertion to operate on.@NonnullAfterInit private Function<org.opensaml.profile.context.ProfileRequestContext,AuthenticationMethodPrincipal> methodLookupStrategy
@Nullable private IdentifierGenerationStrategy idGenerator
public AddAuthenticationStatementToAssertion()
public void setAssertionLookupStrategy(@Nonnull Function<org.opensaml.profile.context.ProfileRequestContext,org.opensaml.saml.saml1.core.Assertion> strategy)
Assertion to operate on.strategy - strategy used to locate the Assertion to operate onpublic void setAuthenticationMethodLookupStrategy(@Nonnull Function<org.opensaml.profile.context.ProfileRequestContext,AuthenticationMethodPrincipal> strategy)
strategy - authentication method lookup strategyprotected void doInitialize()
throws ComponentInitializationException
doInitialize in class AbstractInitializableComponentComponentInitializationExceptionprotected void doExecute(@Nonnull org.opensaml.profile.context.ProfileRequestContext profileRequestContext, @Nonnull AuthenticationContext authenticationContext)
doExecute in class AbstractAuthenticationAction@Nonnull private org.opensaml.saml.saml1.core.AuthenticationStatement buildAuthenticationStatement(@Nonnull org.opensaml.profile.context.ProfileRequestContext profileRequestContext, @Nullable RequestedPrincipalContext requestedPrincipalContext)
AuthenticationStatement to be added to the Response.profileRequestContext - current request contextrequestedPrincipalContext - context specifying request requirements for authn methodCopyright © 1999–2017 Shibboleth Consortium. All rights reserved.