Class EntityIDDigestGenerator
java.lang.Object
org.opensaml.saml.metadata.resolver.impl.EntityIDDigestGenerator
- All Implemented Interfaces:
Function<CriteriaSet,
String>
- Direct Known Subclasses:
DefaultLocalDynamicSourceKeyGenerator
Strategy for processing input criteria to extract the entityID from an
EntityIdCriterion
and produce the digest of the value.
By default the digest strategy used is the SHA-1 algorithm, with output in lower-case hexadecimal. By default, prefix, suffix and value separator are null.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringDigester
String digester for the EntityDescriptor's entityID.private String
Prefix to prepend to the digested value.private String
Common separator between prefix, digested and suffix values.private String
Suffix to append to the digested value. -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.EntityIDDigestGenerator
(StringDigester valueDigester, String keyPrefix, String keySuffix, String valueSeparator) Constructor. -
Method Summary
-
Field Details
-
digester
String digester for the EntityDescriptor's entityID. -
prefix
Prefix to prepend to the digested value. -
suffix
Suffix to append to the digested value. -
separator
Common separator between prefix, digested and suffix values.
-
-
Constructor Details
-
EntityIDDigestGenerator
public EntityIDDigestGenerator()Constructor. -
EntityIDDigestGenerator
public EntityIDDigestGenerator(@Nullable StringDigester valueDigester, @Nullable String keyPrefix, @Nullable String keySuffix, @Nullable String valueSeparator) Constructor.- Parameters:
valueDigester
- optional digeser for the entityID valuekeyPrefix
- optional prefix for the digested valuekeySuffix
- optional suffix for the digested valuevalueSeparator
- optional separator between the prefix, digest and suffix values
-
-
Method Details
-
apply
- Specified by:
apply
in interfaceFunction<CriteriaSet,
String>
-
buildKey
Build the key by applying the configured prefix and/or suffix, if present.- Parameters:
keyValue
- the primary key value data being represented- Returns:
- the key value with prefix and suffix applied
-