Class AbstractAttributeContextUserIdentityStrategy<T>
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.plugin.authn.webauthn.context.navigate.AbstractAttributeContextUserIdentityStrategy<T>
- Type Parameters:
T- the type of attribute value to return
- All Implemented Interfaces:
Function<ProfileRequestContext,,T> Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent
- Direct Known Subclasses:
AttributeContextByteArrayLookupStrategy,AttributeContextStringLookupStrategy
public abstract class AbstractAttributeContextUserIdentityStrategy<T>
extends AbstractIdentifiableInitializableComponent
implements Function<ProfileRequestContext,T>
A base class for functions that retrieve a single attribute value from the
attribute context.-
Field Summary
FieldsModifier and TypeFieldDescriptionStrategy used to locate theAttributeContextassociated with a givenProfileRequestContext.private StringThe attribute Id to extract the value from.private final org.slf4j.LoggerClass logger.private booleanWhether to look at filtered or unfiltered attributes. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected IdPAttributegetAttribute(ProfileRequestContext profileRequestContext) Get the attribute from either the filtered or unfiltered set of attributes with the given attribute Id from the AttributeContext (if it exists).protected StringGet the attribute Id to extract the value from.booleanGet whether to source the input attributes from the unfiltered set.voidSet the strategy used to locate theAttributeContextassociated with a givenProfileRequestContext.voidsetAttributeId(String id) Set the attribute Id to extract the value from.voidsetUseUnfilteredAttributes(boolean flag) Set whether to source the input attributes from the unfiltered set.Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
doInitialize, 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 logClass logger. -
attributeContextLookupStrategy
Strategy used to locate theAttributeContextassociated with a givenProfileRequestContext. -
attributeId
The attribute Id to extract the value from. -
useUnfilteredAttributes
private boolean useUnfilteredAttributesWhether to look at filtered or unfiltered attributes. Default is filtered.
-
-
Constructor Details
-
AbstractAttributeContextUserIdentityStrategy
protected AbstractAttributeContextUserIdentityStrategy()Constructor.
-
-
Method Details
-
isUseUnfilteredAttributes
public boolean isUseUnfilteredAttributes()Get whether to source the input attributes from the unfiltered set.- Returns:
- whether to source the input attributes from the unfiltered set
-
setUseUnfilteredAttributes
public void setUseUnfilteredAttributes(boolean flag) Set whether to source the input attributes from the unfiltered set.Defaults to true.
- Parameters:
flag- flag to set
-
setAttributeId
Set the attribute Id to extract the value from.- Parameters:
id- the attributeId.
-
getAttributeId
Get the attribute Id to extract the value from.- Returns:
- the attributeId.
-
setAttributeContextLookupStrategy
public void setAttributeContextLookupStrategy(@Nonnull Function<ProfileRequestContext, AttributeContext> strategy) Set the strategy used to locate theAttributeContextassociated with a givenProfileRequestContext.- Parameters:
strategy- strategy used to locate theAttributeContextassociated with a givenProfileRequestContext
-
getAttribute
Get the attribute from either the filtered or unfiltered set of attributes with the given attribute Id from the AttributeContext (if it exists).- Parameters:
profileRequestContext- the profile request context to locate the attribute context and the attribute from- Returns:
- the IdPAttribute, or
nullif not found.
-