public abstract class BaseAddAttributeStatementToAssertion extends AbstractProfileAction
AttributeContext into a SAML attribute statement.
The IdPAttribute set to be encoded is drawn from
an AttributeContext returned from a
lookup strategy, by default located on the RelyingPartyContext beneath the profile request context.
EventIds.PROCEED_EVENT_ID, EventIds.INVALID_MSG_CTX, EventIds.INVALID_PROFILE_CTX| Modifier and Type | Field and Description |
|---|---|
private Function<org.opensaml.profile.context.ProfileRequestContext,AttributeContext> |
attributeContextLookupStrategy
Strategy used to locate the
AttributeContext associated with a given ProfileRequestContext. |
private AttributeContext |
attributeCtx
AttributeContext to use.
|
private IdentifierGenerationStrategy |
idGenerator
The generator to use.
|
private Function<org.opensaml.profile.context.ProfileRequestContext,IdentifierGenerationStrategy> |
idGeneratorLookupStrategy
Strategy used to locate the
IdentifierGenerationStrategy to use. |
private boolean |
ignoringUnencodableAttributes
Whether attributes that result in an
AttributeEncodingException
when being encoded should be ignored or
result in an IdPEventIds.UNABLE_ENCODE_ATTRIBUTE transition. |
private String |
issuerId
EntityID to populate as assertion issuer.
|
private Function<org.opensaml.profile.context.ProfileRequestContext,String> |
issuerLookupStrategy
Strategy used to obtain the assertion issuer value.
|
private org.slf4j.Logger |
log
Class logger.
|
private boolean |
statementInOwnAssertion
Whether the generated attribute statement should be placed in its own assertion or added to one if it exists.
|
| Constructor and Description |
|---|
BaseAddAttributeStatementToAssertion()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
doPreExecute(org.opensaml.profile.context.ProfileRequestContext profileRequestContext) |
AttributeContext |
getAttributeContext()
Get the
AttributeContext to encode. |
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.
|
boolean |
isIgnoringUnencodableAttributes()
Get whether the attributes that result in an
AttributeEncodingException
when being encoded should be ignored or result in an
IdPEventIds.UNABLE_ENCODE_ATTRIBUTE transition. |
boolean |
isStatementInOwnAssertion()
Set whether the generated attribute statement should be placed in its own assertion or added to one if it
exists.
|
void |
setAttributeContextLookupStrategy(Function<org.opensaml.profile.context.ProfileRequestContext,AttributeContext> strategy)
Set the strategy used to locate the
AttributeContext associated with a given
ProfileRequestContext. |
void |
setIdentifierGeneratorLookupStrategy(Function<org.opensaml.profile.context.ProfileRequestContext,IdentifierGenerationStrategy> strategy)
Set the strategy used to locate the
IdentifierGenerationStrategy to use. |
void |
setIgnoringUnencodableAttributes(boolean flag)
Set whether the attributes that result in an
AttributeEncodingException
when being encoded should be ignored or result in an
IdPEventIds.UNABLE_ENCODE_ATTRIBUTE transition. |
void |
setIssuerLookupStrategy(Function<org.opensaml.profile.context.ProfileRequestContext,String> strategy)
Set the strategy used to locate the issuer value to use.
|
void |
setStatementInOwnAssertion(boolean flag)
Set whether the generated attribute 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, setActivationConditiondoExecute, doPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponsedestroy, doDestroy, doInitialize, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitialize, isInitialized@Nonnull private final org.slf4j.Logger log
private boolean statementInOwnAssertion
private boolean ignoringUnencodableAttributes
AttributeEncodingException
when being encoded should be ignored or
result in an IdPEventIds.UNABLE_ENCODE_ATTRIBUTE transition.@NonnullAfterInit private Function<org.opensaml.profile.context.ProfileRequestContext,IdentifierGenerationStrategy> idGeneratorLookupStrategy
IdentifierGenerationStrategy to use.@Nonnull private Function<org.opensaml.profile.context.ProfileRequestContext,String> issuerLookupStrategy
@Nonnull private Function<org.opensaml.profile.context.ProfileRequestContext,AttributeContext> attributeContextLookupStrategy
AttributeContext associated with a given ProfileRequestContext.@Nullable private AttributeContext attributeCtx
@Nullable private IdentifierGenerationStrategy idGenerator
public BaseAddAttributeStatementToAssertion()
public boolean isStatementInOwnAssertion()
public void setStatementInOwnAssertion(boolean flag)
flag - whether the generated attribute statement should be placed in its own assertion or added to
one if it existspublic boolean isIgnoringUnencodableAttributes()
AttributeEncodingException
when being encoded should be ignored or result in an
IdPEventIds.UNABLE_ENCODE_ATTRIBUTE transition.AttributeEncodingException
when being encoded should be ignored or result in an
IdPEventIds.UNABLE_ENCODE_ATTRIBUTE transitionpublic void setIgnoringUnencodableAttributes(boolean flag)
AttributeEncodingException
when being encoded should be ignored or result in an
IdPEventIds.UNABLE_ENCODE_ATTRIBUTE transition.flag - flag to setpublic void setAttributeContextLookupStrategy(@Nonnull Function<org.opensaml.profile.context.ProfileRequestContext,AttributeContext> strategy)
AttributeContext associated with a given
ProfileRequestContext.strategy - strategy used to locate the AttributeContext associated with a given
ProfileRequestContextpublic void setIdentifierGeneratorLookupStrategy(@Nonnull Function<org.opensaml.profile.context.ProfileRequestContext,IdentifierGenerationStrategy> strategy)
IdentifierGenerationStrategy to use.strategy - lookup strategypublic void setIssuerLookupStrategy(@Nonnull Function<org.opensaml.profile.context.ProfileRequestContext,String> strategy)
strategy - lookup strategy@Nonnull public AttributeContext getAttributeContext()
AttributeContext to encode.@Nonnull public IdentifierGenerationStrategy getIdGenerator()
IdentifierGenerationStrategy to use if an assertion must be created.@Nonnull @NotEmpty public String getIssuerId()
protected boolean doPreExecute(@Nonnull org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
doPreExecute in class org.opensaml.profile.action.AbstractConditionalProfileActionCopyright © 1999–2017 Shibboleth Consortium. All rights reserved.