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 returns
IdPAttributeValue
s derived from the Principal
s
associated with the request. The precise values are determined by an injected Function
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Function<Principal,
List<IdPAttributeValue>> private boolean
Flag denoting whether plugin is being used for subject c14n or standard usage.private final org.slf4j.Logger
Logger.private Function<ProfileRequestContext,
SubjectContext> Strategy used to locate theSubjectContext
to use.private Function<ProfileRequestContext,
Subject> Strategy used to locate theSubject
to use. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
private String
Produce a consistent log prefix.void
setAttributeValuesFunction
(Function<Principal, List<IdPAttributeValue>> strategy) Sets the function to extract attribute values from aPrincipal
.void
setForCanonicalization
(boolean flag) Sets whether the definition is being used during Subject Canonicalization, causing auto-installation of an alternate Subject lookup strategy.void
Sets the strategy used to locate theSubjectContext
associated with a givenAttributeResolutionContext
.void
Sets the strategy used to locate aSubject
associated 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 Details
-
log
@Nonnull private final org.slf4j.Logger logLogger. -
forCanonicalization
private boolean forCanonicalizationFlag denoting whether plugin is being used for subject c14n or standard usage. -
scLookupStrategy
Strategy used to locate theSubjectContext
to use. -
attributeValuesFunction
-
subjectLookupStrategy
Strategy used to locate theSubject
to use.
-
-
Constructor Details
-
SubjectDerivedAttributeValuesFunction
public SubjectDerivedAttributeValuesFunction()Constructor.
-
-
Method Details
-
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 theSubjectContext
associated with a givenAttributeResolutionContext
.- Parameters:
strategy
- strategy used to locate theSubjectContext
associated 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
Sets the strategy used to locate aSubject
associated with a givenAttributeResolutionContext
.- Parameters:
strategy
- strategy used to locate aSubject
associated with a givenAttributeResolutionContext
-
doInitialize
- Overrides:
doInitialize
in classAbstractIdentifiedInitializableComponent
- Throws:
ComponentInitializationException
-
apply
- Specified by:
apply
in interfaceFunction<ProfileRequestContext,
List<IdPAttributeValue>>
-
getLogPrefix
Produce a consistent log prefix.- Returns:
- a consistent log prefix
-