Class AttributeValueLookupFunction
- java.lang.Object
-
- net.shibboleth.idp.consent.logic.impl.AttributeValueLookupFunction
-
- All Implemented Interfaces:
Function<org.opensaml.profile.context.ProfileRequestContext,String>,org.opensaml.messaging.context.navigate.ContextDataLookupFunction<org.opensaml.profile.context.ProfileRequestContext,String>
public class AttributeValueLookupFunction extends Object implements org.opensaml.messaging.context.navigate.ContextDataLookupFunction<org.opensaml.profile.context.ProfileRequestContext,String>
ContextDataLookupFunctionto return the value of an attribute from anAttributeContext.
-
-
Field Summary
Fields Modifier and Type Field Description private Function<org.opensaml.profile.context.ProfileRequestContext,net.shibboleth.idp.attribute.context.AttributeContext>attributeContextLookupStrategyStrategy used to find theAttributeContextfrom theProfileRequestContext.private StringattributeIdThe attribute ID to look for.private LoggerlogClass logger.private booleanuseUnfilteredAttributesWhether to use filtered or unfiltered attributes.
-
Constructor Summary
Constructors Constructor Description AttributeValueLookupFunction(String userAttributeId)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringapply(org.opensaml.profile.context.ProfileRequestContext input)voidsetAttributeContextLookupStrategy(Function<org.opensaml.profile.context.ProfileRequestContext,net.shibboleth.idp.attribute.context.AttributeContext> strategy)Set the attribute context lookup strategy.voidsetUseUnfilteredAttributes(boolean flag)Set whether to use filtered or unfiltered attributes.
-
-
-
Field Detail
-
log
@Nonnull private final Logger log
Class logger.
-
attributeId
@Nonnull @NotEmpty private String attributeId
The attribute ID to look for.
-
attributeContextLookupStrategy
@Nonnull private Function<org.opensaml.profile.context.ProfileRequestContext,net.shibboleth.idp.attribute.context.AttributeContext> attributeContextLookupStrategy
Strategy used to find theAttributeContextfrom theProfileRequestContext.
-
useUnfilteredAttributes
private boolean useUnfilteredAttributes
Whether to use filtered or unfiltered attributes.
-
-
Constructor Detail
-
AttributeValueLookupFunction
public AttributeValueLookupFunction(@Nonnull @NotEmpty String userAttributeId)Constructor.- Parameters:
userAttributeId- the attribute id
-
-
Method Detail
-
setAttributeContextLookupStrategy
public void setAttributeContextLookupStrategy(@Nonnull Function<org.opensaml.profile.context.ProfileRequestContext,net.shibboleth.idp.attribute.context.AttributeContext> strategy)Set the attribute context lookup strategy.- Parameters:
strategy- the attribute context lookup strategy
-
setUseUnfilteredAttributes
public void setUseUnfilteredAttributes(boolean flag)
Set whether to use filtered or unfiltered attributes.Defaults to true.
- Parameters:
flag- flag to set
-
-