Class EntityIDDigestGenerator
- java.lang.Object
-
- org.opensaml.saml.metadata.resolver.impl.EntityIDDigestGenerator
-
- All Implemented Interfaces:
Function<CriteriaSet,String>
- Direct Known Subclasses:
DefaultLocalDynamicSourceKeyGenerator
public class EntityIDDigestGenerator extends Object implements Function<CriteriaSet,String>
Strategy for processing input criteria to extract the entityID from anEntityIdCriterion
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
Fields Modifier and Type Field Description private StringDigester
digester
String digester for the EntityDescriptor's entityID.private String
prefix
Prefix to prepend to the digested value.private String
separator
Common separator between prefix, digested and suffix values.private String
suffix
Suffix to append to the digested value.
-
Constructor Summary
Constructors Constructor Description EntityIDDigestGenerator()
Constructor.EntityIDDigestGenerator(StringDigester valueDigester, String keyPrefix, String keySuffix, String valueSeparator)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
apply(CriteriaSet criteria)
protected String
buildKey(String keyValue)
Build the key by applying the configured prefix and/or suffix, if present.
-
-
-
Field Detail
-
digester
@Nonnull private StringDigester digester
String digester for the EntityDescriptor's entityID.
-
prefix
@Nullable private String prefix
Prefix to prepend to the digested value.
-
suffix
@Nullable private String suffix
Suffix to append to the digested value.
-
separator
@Nullable private String separator
Common separator between prefix, digested and suffix values.
-
-
Constructor Detail
-
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 Detail
-
apply
@Nullable public String apply(@Nullable CriteriaSet criteria)
- Specified by:
apply
in interfaceFunction<CriteriaSet,String>
-
-