public class AttributeSourcedSubjectCanonicalization extends AbstractSubjectCanonicalizationAction
IdPAttribute value from an AttributeContext child obtained via
lookup function (by default a child of the SubjectCanonicalizationContext), and uses it as the result
of subject canonicalization.
This action operates on a set of previously resolved attributes that are presumed to have been generated based
in some fashion on the content of the SubjectCanonicalizationContext.
String and scoped attribute values are supported.
EventIds.PROCEED_EVENT_ID, AuthnEventIds.INVALID_SUBJECTProfileRequestContext.getSubcontext(SubjectCanonicalizationContext.class) != null
SubjectCanonicalizationContext.getPrincipalName() != null || SubjectCanonicalizationContext.getException() != null
| Modifier and Type | Field and Description |
|---|---|
private com.google.common.base.Function<ProfileRequestContext,AttributeContext> |
attributeContextLookupStrategy
Lookup strategy for
AttributeContext to read from. |
private AttributeContext |
attributeCtx
The context to read from.
|
private List<String> |
attributeSourceIds
Ordered list of attributes to look for and read from.
|
private char |
delimiter
Delimiter to use for scoped attribute serialization.
|
private org.slf4j.Logger |
log
Class logger.
|
| Constructor and Description |
|---|
AttributeSourcedSubjectCanonicalization()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doExecute(ProfileRequestContext profileRequestContext,
SubjectCanonicalizationContext c14nContext) |
protected void |
doInitialize() |
protected boolean |
doPreExecute(ProfileRequestContext profileRequestContext,
SubjectCanonicalizationContext c14nContext) |
void |
setAttributeContextLookupStrategy(com.google.common.base.Function<ProfileRequestContext,AttributeContext> strategy)
Set the lookup strategy for the
AttributeContext to read from. |
void |
setAttributeSourceIds(List<String> ids)
Set the attribute IDs to read from in order of preference.
|
void |
setScopedDelimiter(char ch)
Set the delimiter to use for serializing scoped attribute values.
|
applyTransforms, doExecute, doPreExecute, setLookupStrategy, setLowercase, setTransforms, setTrim, setUppercasedoExecute, 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 char delimiter
@Nonnull @NonnullElements private List<String> attributeSourceIds
@Nonnull private com.google.common.base.Function<ProfileRequestContext,AttributeContext> attributeContextLookupStrategy
AttributeContext to read from.@Nullable private AttributeContext attributeCtx
public AttributeSourcedSubjectCanonicalization()
public void setScopedDelimiter(char ch)
ch - delimiter to usepublic void setAttributeSourceIds(@Nonnull@NonnullElements List<String> ids)
ids - attribute IDs to read frompublic void setAttributeContextLookupStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,AttributeContext> strategy)
AttributeContext to read from.strategy - lookup strategyprotected void doInitialize()
throws ComponentInitializationException
doInitialize in class AbstractInitializableComponentComponentInitializationExceptionprotected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull SubjectCanonicalizationContext c14nContext)
doPreExecute in class AbstractSubjectCanonicalizationActionprotected void doExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull SubjectCanonicalizationContext c14nContext)
doExecute in class AbstractSubjectCanonicalizationActionCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.