NameIdType - type of identifier objectpublic class LegacyNameIdentifierGenerator<NameIdType extends org.opensaml.saml.common.SAMLObject> extends AbstractIdentifiableInitializableComponent implements org.opensaml.saml.common.profile.NameIdentifierGenerator<NameIdType>
NameIdentifierAttributeEncoders attached.
Provided for compatibility with V2 configurations.
While in principle this generator could be configured in the V3 manner by mapping Format(s) to instances of the class, this would require extra configuration to guarantee compatibility, so by design it works by relying on the Format value supplied at generation time to decide which attribute encoders use, in the manner the V2 IdP does.
| Modifier and Type | Field and Description |
|---|---|
private Predicate<org.opensaml.profile.context.ProfileRequestContext> |
activationCondition
A predicate indicating whether the component applies to a request.
|
private Function<org.opensaml.profile.context.ProfileRequestContext,AttributeContext> |
attributeContextLookupStrategy
Lookup strategy for
AttributeContext. |
private Class<? extends NameIdentifierAttributeEncoder> |
encoderType
Type of encoder to check for when looping.
|
private org.slf4j.Logger |
log
Class logger.
|
| Modifier | Constructor and Description |
|---|---|
protected |
LegacyNameIdentifierGenerator(Class<? extends NameIdentifierAttributeEncoder> clazz)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
NameIdType |
generate(org.opensaml.profile.context.ProfileRequestContext profileRequestContext,
String format) |
void |
setActivationCondition(Predicate<org.opensaml.profile.context.ProfileRequestContext> condition)
Set an activation condition that determines whether to run or not.
|
void |
setAttributeContextLookupStrategy(Function<org.opensaml.profile.context.ProfileRequestContext,AttributeContext> strategy)
Set the lookup strategy to locate the
AttributeContext to pull from. |
setIddoInitialize, getIddestroy, doDestroy, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetId@Nonnull private final org.slf4j.Logger log
@Nonnull private Predicate<org.opensaml.profile.context.ProfileRequestContext> activationCondition
@Nonnull private Function<org.opensaml.profile.context.ProfileRequestContext,AttributeContext> attributeContextLookupStrategy
AttributeContext.@Nonnull private Class<? extends NameIdentifierAttributeEncoder> encoderType
protected LegacyNameIdentifierGenerator(@Nonnull Class<? extends NameIdentifierAttributeEncoder> clazz)
clazz - encoder class typepublic void setActivationCondition(@Nonnull Predicate<org.opensaml.profile.context.ProfileRequestContext> condition)
condition - an activation conditionpublic void setAttributeContextLookupStrategy(@Nonnull Function<org.opensaml.profile.context.ProfileRequestContext,AttributeContext> strategy)
AttributeContext to pull from.strategy - lookup strategy@Nullable public NameIdType generate(@Nonnull org.opensaml.profile.context.ProfileRequestContext profileRequestContext, @Nonnull@NotEmpty String format) throws org.opensaml.saml.common.SAMLException
generate in interface org.opensaml.saml.common.profile.NameIdentifierGenerator<NameIdType extends org.opensaml.saml.common.SAMLObject>org.opensaml.saml.common.SAMLExceptionCopyright © 1999–2017 Shibboleth Consortium. All rights reserved.