Class AttributeSourcedSAML1NameIdentifierGenerator
java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
org.opensaml.saml.common.profile.AbstractNameIdentifierGenerator<NameIdentifier>
org.opensaml.saml.saml1.profile.AbstractSAML1NameIdentifierGenerator
net.shibboleth.idp.saml.nameid.impl.AttributeSourcedSAML1NameIdentifierGenerator
- All Implemented Interfaces:
Predicate<ProfileRequestContext>
,Component
,DestructableComponent
,IdentifiableComponent
,IdentifiedComponent
,InitializableComponent
,FormatSpecificNameIdentifierGenerator<NameIdentifier>
,NameIdentifierGenerator<NameIdentifier>
,SAML1NameIdentifierGenerator
@ThreadSafeAfterInit
public class AttributeSourcedSAML1NameIdentifierGenerator
extends AbstractSAML1NameIdentifierGenerator
Generator for
NameIdentifier
objects based on IdPAttribute
data.-
Field Summary
FieldsModifier and TypeFieldDescriptionStrategy function to lookup AttributeContext.Attribute(s) to use as an identifier source.private char
Delimiter to use for scoped attribute serialization.private final org.slf4j.Logger
Class logger.private boolean
Whether to look at filtered or unfiltered attributes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected NameIdentifier
doGenerate
(ProfileRequestContext profileRequestContext) protected void
protected String
getIdentifier
(ProfileRequestContext profileRequestContext) void
Set the lookup strategy to use to locate theAttributeContext
.void
setAttributeSourceIds
(List<String> ids) Set the attribute sources to pull from.void
setScopedDelimiter
(char ch) Set the delimiter to use for serializing scoped attribute values.void
setUseUnfilteredAttributes
(boolean flag) Set whether to source the input attributes from the unfiltered attribute set.Methods inherited from class org.opensaml.saml.common.profile.AbstractNameIdentifierGenerator
generate, getDefaultIdPNameQualifierLookupStrategy, getDefaultSPNameQualifierLookupStrategy, getEffectiveIdPNameQualifier, getEffectiveSPNameQualifier, getFormat, getIdPNameQualifier, getSPNameQualifier, getSPProvidedID, isOmitQualifiers, setActivationCondition, setDefaultIdPNameQualifierLookupStrategy, setDefaultSPNameQualifierLookupStrategy, setFormat, setIdPNameQualifier, setOmitQualifiers, setSPNameQualifier, setSPProvidedId, test
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
Methods inherited from interface org.opensaml.saml.saml1.profile.SAML1NameIdentifierGenerator
generate
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
attributeContextLookupStrategy
Strategy function to lookup AttributeContext. -
useUnfilteredAttributes
private boolean useUnfilteredAttributesWhether to look at filtered or unfiltered attributes. -
delimiter
private char delimiterDelimiter to use for scoped attribute serialization. -
attributeSourceIds
Attribute(s) to use as an identifier source.
-
-
Constructor Details
-
AttributeSourcedSAML1NameIdentifierGenerator
public AttributeSourcedSAML1NameIdentifierGenerator()Constructor.
-
-
Method Details
-
setAttributeContextLookupStrategy
public void setAttributeContextLookupStrategy(@Nonnull Function<ProfileRequestContext, AttributeContext> strategy) Set the lookup strategy to use to locate theAttributeContext
.- Parameters:
strategy
- lookup function to use
-
setScopedDelimiter
public void setScopedDelimiter(char ch) Set the delimiter to use for serializing scoped attribute values.- Parameters:
ch
- scope to set
-
setAttributeSourceIds
Set the attribute sources to pull from.- Parameters:
ids
- attribute IDs to pull from
-
setUseUnfilteredAttributes
public void setUseUnfilteredAttributes(boolean flag) Set whether to source the input attributes from the unfiltered attribute set.- Parameters:
flag
- flag to set
-
doInitialize
- Overrides:
doInitialize
in classAbstractNameIdentifierGenerator<NameIdentifier>
- Throws:
ComponentInitializationException
-
doGenerate
@Nullable protected NameIdentifier doGenerate(@Nonnull ProfileRequestContext profileRequestContext) throws SAMLException - Overrides:
doGenerate
in classAbstractSAML1NameIdentifierGenerator
- Throws:
SAMLException
-
getIdentifier
@Nullable protected String getIdentifier(@Nonnull ProfileRequestContext profileRequestContext) throws SAMLException - Overrides:
getIdentifier
in classAbstractNameIdentifierGenerator<NameIdentifier>
- Throws:
SAMLException
-