@Prototype public class AddAuthnStatementToAssertionFromInboundAssertionToken extends AbstractProfileAction
AuthnStatement and adds it to an Assertion returned by a lookup
strategy, by default in the InOutOperationContext.getOutboundMessageContext().
This action is designed specifically to be used with SAML 2 delegation.
The AuthnStatement will be cloned directly from the inbound Assertion token obtained
from via the setAssertionTokenStrategy(Function).
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().
| Modifier and Type | Class and Description |
|---|---|
private class |
AddAuthnStatementToAssertionFromInboundAssertionToken.AssertionStrategy
Default strategy for obtaining assertion to modify.
|
| Modifier and Type | Field and Description |
|---|---|
private com.google.common.base.Function<ProfileRequestContext,Assertion> |
assertionLookupStrategy
Strategy used to locate the
Assertion to operate on. |
private com.google.common.base.Function<ProfileRequestContext,Assertion> |
assertionTokenStrategy
Function used to resolve the inbound assertion token to process.
|
private IdentifierGenerationStrategy |
idGenerator
The generator to use.
|
private com.google.common.base.Function<ProfileRequestContext,IdentifierGenerationStrategy> |
idGeneratorLookupStrategy
Strategy used to locate the
IdentifierGenerationStrategy to use. |
private String |
issuerId
EntityID to populate as assertion issuer.
|
private com.google.common.base.Function<ProfileRequestContext,String> |
issuerLookupStrategy
Strategy used to obtain the assertion issuer value.
|
private org.slf4j.Logger |
log
Class logger.
|
private AuthnStatement |
sourceStatement
The authentication statement which is to be cloned into the new Assertion.
|
private boolean |
statementInOwnAssertion
Whether the generated authentication statement should be placed in its own assertion or added to one if it
exists.
|
| Constructor and Description |
|---|
AddAuthnStatementToAssertionFromInboundAssertionToken()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doExecute(ProfileRequestContext profileRequestContext) |
protected void |
doInitialize() |
protected boolean |
doPreExecute(ProfileRequestContext profileRequestContext) |
IdentifierGenerationStrategy |
getIdGenerator()
Get the
IdentifierGenerationStrategy to use if an assertion must be created. |
String |
getIssuerId()
Get the issuer name to use if an assertion must be created.
|
protected AuthnStatement |
getNewAuthnStatement()
Obtain the new
AuthnStatement to add by cloning the inbound token's statement
which was previously stored. |
boolean |
isStatementInOwnAssertion()
Set whether the generated statement should be placed in its own assertion or added to one if it exists.
|
void |
setAssertionLookupStrategy(com.google.common.base.Function<ProfileRequestContext,Assertion> strategy)
Set the strategy used to locate the
Assertion to operate on. |
void |
setAssertionTokenStrategy(com.google.common.base.Function<ProfileRequestContext,Assertion> strategy)
Set the strategy used to locate the inbound assertion token to process.
|
void |
setIdentifierGeneratorLookupStrategy(com.google.common.base.Function<ProfileRequestContext,IdentifierGenerationStrategy> strategy)
Set the strategy used to locate the
IdentifierGenerationStrategy to use. |
void |
setIssuerLookupStrategy(com.google.common.base.Function<ProfileRequestContext,String> strategy)
Set the strategy used to locate the issuer value to use.
|
void |
setStatementInOwnAssertion(boolean inOwnAssertion)
Set whether the generated authentication statement should be placed in its own assertion or added to one if it
exists.
|
doExecute, 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
private boolean statementInOwnAssertion
@Nonnull private com.google.common.base.Function<ProfileRequestContext,IdentifierGenerationStrategy> idGeneratorLookupStrategy
IdentifierGenerationStrategy to use.@Nonnull private com.google.common.base.Function<ProfileRequestContext,String> issuerLookupStrategy
@Nullable private IdentifierGenerationStrategy idGenerator
@NonnullAfterInit private com.google.common.base.Function<ProfileRequestContext,Assertion> assertionLookupStrategy
Assertion to operate on.@Nonnull private com.google.common.base.Function<ProfileRequestContext,Assertion> assertionTokenStrategy
@Nullable private AuthnStatement sourceStatement
public AddAuthnStatementToAssertionFromInboundAssertionToken()
public boolean isStatementInOwnAssertion()
public void setStatementInOwnAssertion(boolean inOwnAssertion)
inOwnAssertion - whether the generated authentication statement should be placed in its own assertion or
added to one if it existspublic void setAssertionTokenStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,Assertion> strategy)
strategy - lookup strategypublic void setIdentifierGeneratorLookupStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,IdentifierGenerationStrategy> strategy)
IdentifierGenerationStrategy to use.strategy - lookup strategypublic void setIssuerLookupStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,String> strategy)
strategy - lookup strategy@Nonnull public IdentifierGenerationStrategy getIdGenerator()
IdentifierGenerationStrategy to use if an assertion must be created.@Nonnull public String getIssuerId()
public void setAssertionLookupStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,Assertion> strategy)
Assertion to operate on.strategy - strategy used to locate the Assertion to operate onprotected void doInitialize()
throws ComponentInitializationException
doInitialize in class AbstractInitializableComponentComponentInitializationExceptionprotected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext)
doPreExecute in class AbstractConditionalProfileActionprotected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)
doExecute in class AbstractProfileAction@Nullable protected AuthnStatement getNewAuthnStatement()
AuthnStatement to add by cloning the inbound token's statement
which was previously stored.Copyright © 1999–2018 Shibboleth Consortium. All rights reserved.