Class PopulateAttributeReleaseContext

  • All Implemented Interfaces:
    net.shibboleth.utilities.java.support.component.Component, net.shibboleth.utilities.java.support.component.DestructableComponent, net.shibboleth.utilities.java.support.component.InitializableComponent, org.opensaml.profile.action.ProfileAction, Aware, MessageSource, MessageSourceAware, Action

    public class PopulateAttributeReleaseContext
    extends AbstractAttributeReleaseAction
    Attribute consent action to populate the attribute consent context with the attributes for which consent should be obtained. A predicate is used to determine whether consent should be obtained for each IdP attribute in the attribute context.
    Event:
    EventIds.PROCEED_EVENT_ID
    Postcondition:
    See above.
    • Field Detail

      • log

        @Nonnull
        private final Logger log
        Class logger.
      • attributePredicate

        @Nonnull
        private Predicate<net.shibboleth.idp.attribute.IdPAttribute> attributePredicate
        Predicate to determine whether consent should be obtained for an attribute.
      • attributeIdComparator

        @Nullable
        private Comparator<String> attributeIdComparator
        Comparator used to sort attributes displayed to user.
    • Constructor Detail

      • PopulateAttributeReleaseContext

        public PopulateAttributeReleaseContext()
    • Method Detail

      • setAttributePredicate

        public void setAttributePredicate​(@Nonnull
                                          Predicate<net.shibboleth.idp.attribute.IdPAttribute> predicate)
        Set the predicate to determine whether consent should be obtained for an attribute.
        Parameters:
        predicate - predicate to determine whether consent should be obtained for an attribute
      • setAttributeIdComparator

        public void setAttributeIdComparator​(@Nullable
                                             Comparator<String> comparator)
        Set the comparator used to sort attributes displayed to user.
        Parameters:
        comparator - comparator used to sort attributes displayed to user
      • doInitialize

        protected void doInitialize()
                             throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
        Overrides:
        doInitialize in class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
        Throws:
        net.shibboleth.utilities.java.support.component.ComponentInitializationException
      • doExecute

        protected void doExecute​(@Nonnull
                                 org.opensaml.profile.context.ProfileRequestContext profileRequestContext,
                                 @Nonnull
                                 net.shibboleth.idp.profile.context.ProfileInterceptorContext interceptorContext)
        Overrides:
        doExecute in class net.shibboleth.idp.profile.interceptor.AbstractProfileInterceptorAction