Class AttributeSourcedSubjectCanonicalization

    • Field Detail

      • log

        @Nonnull
        private final org.slf4j.Logger log
        Class logger.
      • delimiter

        private char delimiter
        Delimiter to use for scoped attribute serialization.
      • resolveFromSubject

        private boolean resolveFromSubject
        Whether to also check the original Subject for IdPAttributePrincipals.
      • attributeSourceIds

        @Nonnull
        @NonnullElements
        private List<String> attributeSourceIds
        Ordered list of attributes to look for and read from.
      • attributeCtx

        @Nullable
        private AttributeContext attributeCtx
        The context to read from.
    • Constructor Detail

      • AttributeSourcedSubjectCanonicalization

        public AttributeSourcedSubjectCanonicalization()
        Constructor.
    • Method Detail

      • setScopedDelimiter

        public void setScopedDelimiter​(char ch)
        Set the delimiter to use for serializing scoped attribute values.
        Parameters:
        ch - delimiter to use
      • setResolveFromSubject

        public void setResolveFromSubject​(boolean flag)
        Whether to include any IdPAttributePrincipal objects found in the input Subject when searching for a matching attribute ID.
        Parameters:
        flag - flag to set
        Since:
        4.1.0
      • setAttributeSourceIds

        public void setAttributeSourceIds​(@Nonnull @NonnullElements
                                          List<String> ids)
        Set the attribute IDs to read from in order of preference.
        Parameters:
        ids - attribute IDs to read from
      • doPreExecute

        protected boolean doPreExecute​(@Nonnull
                                       ProfileRequestContext profileRequestContext,
                                       @Nonnull
                                       SubjectCanonicalizationContext c14nContext)
        Performs this c14n action's pre-execute step. Default implementation just returns true iff a subject is set.
        Overrides:
        doPreExecute in class AbstractSubjectCanonicalizationAction
        Parameters:
        profileRequestContext - the current IdP profile request context
        c14nContext - the current subject canonicalization context
        Returns:
        true iff execution should continue
      • findValue

        @Nullable
        private String findValue​(@Nonnull
                                 IdPAttribute attribute)
        Check for a compatible value in the input attribute.
        Parameters:
        attribute - input attribute
        Returns:
        value to use for result, or null