Class EntityIDDigestGenerator

  • All Implemented Interfaces:
    Function<net.shibboleth.utilities.java.support.resolver.CriteriaSet,​String>
    Direct Known Subclasses:
    DefaultLocalDynamicSourceKeyGenerator

    public class EntityIDDigestGenerator
    extends Object
    implements Function<net.shibboleth.utilities.java.support.resolver.CriteriaSet,​String>
    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 Detail

      • digester

        @Nonnull
        private net.shibboleth.utilities.java.support.codec.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
                                       net.shibboleth.utilities.java.support.codec.StringDigester valueDigester,
                                       @Nullable
                                       String keyPrefix,
                                       @Nullable
                                       String keySuffix,
                                       @Nullable
                                       String valueSeparator)
        Constructor.
        Parameters:
        valueDigester - optional digeser for the entityID value
        keyPrefix - optional prefix for the digested value
        keySuffix - optional suffix for the digested value
        valueSeparator - optional separator between the prefix, digest and suffix values
    • Method Detail

      • apply

        @Nullable
        public String apply​(@Nullable
                            net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria)
        Specified by:
        apply in interface Function<net.shibboleth.utilities.java.support.resolver.CriteriaSet,​String>
      • buildKey

        protected String buildKey​(@Nonnull
                                  String keyValue)
        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