Class SubjectDerivedAttributeValuesFunction
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.authn.context.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
IdPAttributeValues derived from the Principals
associated with the request. The precise values are determined by an injected Function.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Function<Principal,List<IdPAttributeValue>> private booleanFlag denoting whether plugin is being used for subject c14n or standard usage.private final org.slf4j.LoggerLogger.private Function<ProfileRequestContext,SubjectContext> Strategy used to locate theSubjectContextto use.private Function<ProfileRequestContext,Subject> Strategy used to locate theSubjectto use. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprivate StringProduce 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.voidSets the strategy used to locate theSubjectContextassociated with a givenAttributeResolutionContext.voidSets the strategy used to locate aSubjectassociated with a givenAttributeResolutionContext.Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.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 theSubjectContextto use. -
attributeValuesFunction
-
subjectLookupStrategy
Strategy used to locate theSubjectto 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 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
Sets the strategy used to locate aSubjectassociated with a givenAttributeResolutionContext.- Parameters:
strategy- strategy used to locate aSubjectassociated with a givenAttributeResolutionContext
-
doInitialize
- Overrides:
doInitializein classAbstractIdentifiedInitializableComponent- Throws:
ComponentInitializationException
-
apply
@Nullable @Unmodifiable @NotLive public List<IdPAttributeValue> apply(@Nullable ProfileRequestContext prc) - Specified by:
applyin interfaceFunction<ProfileRequestContext,List<IdPAttributeValue>>
-
getLogPrefix
Produce a consistent log prefix.- Returns:
- a consistent log prefix
-