Class SubjectDerivedAttributeValuesFunction
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
-
- net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
-
- net.shibboleth.idp.attribute.resolver.ad.impl.SubjectDerivedAttributeValuesFunction
-
- All Implemented Interfaces:
Function<ProfileRequestContext,List<IdPAttributeValue>>,Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent
public class SubjectDerivedAttributeValuesFunction extends AbstractIdentifiableInitializableComponent implements Function<ProfileRequestContext,List<IdPAttributeValue>>
A Function which returnsIdPAttributeValues derived from thePrincipals associated with the request. The precise values are determined by an injectedFunction.
-
-
Field Summary
Fields Modifier and Type Field Description private Function<Principal,List<IdPAttributeValue>>attributeValuesFunctionprivate booleanforCanonicalizationFlag denoting whether plugin is being used for subject c14n or standard usage.private org.slf4j.LoggerlogLogger.private Function<ProfileRequestContext,SubjectContext>scLookupStrategyStrategy used to locate theSubjectContextto use.private Function<ProfileRequestContext,Subject>subjectLookupStrategyStrategy used to locate theSubjectto use.
-
Constructor Summary
Constructors Constructor Description SubjectDerivedAttributeValuesFunction()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<IdPAttributeValue>apply(ProfileRequestContext prc)protected voiddoInitialize()private StringgetLogPrefix()Produce a consistent log prefix.voidsetAttributeValuesFunction(Function<Principal,List<IdPAttributeValue>> strategy)Sets the function to extract attribute values from aPrincipal.voidsetForCanonicalization(boolean flag)Sets whether the definition is being used during Subject Canonicalization, causing auto-installation of an alternate Subject lookup strategy.voidsetSubjectContextLookupStrategy(Function<ProfileRequestContext,SubjectContext> strategy)Sets the strategy used to locate theSubjectContextassociated with a givenAttributeResolutionContext.voidsetSubjectLookupStrategy(Function<ProfileRequestContext,Subject> strategy)Sets the strategy used to locate aSubjectassociated with a givenAttributeResolutionContext.-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
setId
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
getId
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, initialize, isDestroyed, isInitialized
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiedComponent
getId
-
-
-
-
Field Detail
-
log
@Nonnull private final org.slf4j.Logger log
Logger.
-
forCanonicalization
private boolean forCanonicalization
Flag denoting whether plugin is being used for subject c14n or standard usage.
-
scLookupStrategy
@Nonnull private Function<ProfileRequestContext,SubjectContext> scLookupStrategy
Strategy used to locate theSubjectContextto use.
-
attributeValuesFunction
@NonnullAfterInit private Function<Principal,List<IdPAttributeValue>> attributeValuesFunction
-
subjectLookupStrategy
@Nullable private Function<ProfileRequestContext,Subject> subjectLookupStrategy
Strategy used to locate theSubjectto use.
-
-
Method Detail
-
setForCanonicalization
public void setForCanonicalization(boolean flag)
Sets whether the definition is being used during Subject Canonicalization, causing auto-installation of an alternate Subject lookup strategy.- Parameters:
flag- flag to set
-
setSubjectContextLookupStrategy
public void setSubjectContextLookupStrategy(@Nonnull Function<ProfileRequestContext,SubjectContext> strategy)Sets the strategy used to locate theSubjectContextassociated with a givenAttributeResolutionContext.- Parameters:
strategy- strategy used to locate theSubjectContextassociated with a givenAttributeResolutionContext
-
setAttributeValuesFunction
public void setAttributeValuesFunction(@Nonnull Function<Principal,List<IdPAttributeValue>> strategy)Sets the function to extract attribute values from aPrincipal.- Parameters:
strategy- strategy function
-
setSubjectLookupStrategy
public void setSubjectLookupStrategy(@Nullable Function<ProfileRequestContext,Subject> strategy)Sets the strategy used to locate aSubjectassociated with a givenAttributeResolutionContext.- Parameters:
strategy- strategy used to locate aSubjectassociated with a givenAttributeResolutionContext
-
doInitialize
protected void doInitialize() throws ComponentInitializationException- Overrides:
doInitializein classAbstractIdentifiedInitializableComponent- Throws:
ComponentInitializationException
-
apply
@Nullable public List<IdPAttributeValue> apply(@Nullable ProfileRequestContext prc)
- Specified by:
applyin interfaceFunction<ProfileRequestContext,List<IdPAttributeValue>>
-
getLogPrefix
private String getLogPrefix()
Produce a consistent log prefix.- Returns:
- a consistent log prefix
-
-