public class AddAttributeStatementToAssertion extends BaseAddAttributeStatementToAssertion
AttributeStatement 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
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, IdPEventIds.UNABLE_ENCODE_ATTRIBUTE| Modifier and Type | Class and Description |
|---|---|
private class |
AddAttributeStatementToAssertion.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 org.slf4j.Logger |
log
Class logger.
|
| Constructor and Description |
|---|
AddAttributeStatementToAssertion()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
private org.opensaml.saml.saml1.core.AttributeStatement |
buildAttributeStatement(org.opensaml.profile.context.ProfileRequestContext profileRequestContext,
Collection<IdPAttribute> attributes)
Builds an attribute statement from a collection of attributes.
|
protected void |
doExecute(org.opensaml.profile.context.ProfileRequestContext profileRequestContext) |
private void |
encodeAttribute(org.opensaml.profile.context.ProfileRequestContext profileRequestContext,
IdPAttribute attribute,
Collection<org.opensaml.saml.saml1.core.Attribute> results)
Encodes a
IdPAttribute into zero or more Attribute objects if a proper encoder is available. |
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. |
doPreExecute, getAttributeContext, getIdGenerator, getIssuerId, isIgnoringUnencodableAttributes, isStatementInOwnAssertion, setAttributeContextLookupStrategy, setIdentifierGeneratorLookupStrategy, setIgnoringUnencodableAttributes, setIssuerLookupStrategy, setStatementInOwnAssertiondoExecute, execute, getMessage, getMessage, getMessage, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategygetActivationCondition, setActivationConditiondoPostExecute, 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
public AddAttributeStatementToAssertion()
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 onprotected void doExecute(@Nonnull org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
doExecute in class org.opensaml.profile.action.AbstractProfileAction@Nullable private org.opensaml.saml.saml1.core.AttributeStatement buildAttributeStatement(@Nonnull org.opensaml.profile.context.ProfileRequestContext profileRequestContext, @Nullable@NullableElements Collection<IdPAttribute> attributes) throws AttributeEncodingException
profileRequestContext - current profile request contextattributes - the collection of attributesAttributeEncodingException - thrown if there is a problem encoding an attributeprivate void encodeAttribute(@Nonnull org.opensaml.profile.context.ProfileRequestContext profileRequestContext, @Nonnull IdPAttribute attribute, @Nonnull@NonnullElements Collection<org.opensaml.saml.saml1.core.Attribute> results) throws AttributeEncodingException
IdPAttribute into zero or more Attribute objects if a proper encoder is available.profileRequestContext - current profile request contextattribute - the attribute to be encodedresults - collection to add the encoded SAML attributes toAttributeEncodingException - thrown if there is a problem encoding an attributeCopyright © 1999–2017 Shibboleth Consortium. All rights reserved.