Class AttributeReleaseConsentFunction

  • All Implemented Interfaces:
    Function<org.opensaml.profile.context.ProfileRequestContext,​Map<String,​net.shibboleth.idp.consent.Consent>>

    public class AttributeReleaseConsentFunction
    extends Object
    implements Function<org.opensaml.profile.context.ProfileRequestContext,​Map<String,​net.shibboleth.idp.consent.Consent>>
    Function that returns a map of consent objects representing consent to attribute release. Each consent object represents consent to an attribute. The id of each consent object is an attribute id, and the value of each consent object is a hash of the attribute's values. A consent object is created for every consentable attribute in the attribute release context.
    • Field Detail

      • consentContextLookupStrategy

        @Nonnull
        private Function<org.opensaml.profile.context.ProfileRequestContext,​net.shibboleth.idp.consent.context.ConsentContext> consentContextLookupStrategy
        Strategy used to find the ConsentContext from the ProfileRequestContext.
      • consentFlowDescriptorLookupStrategy

        @Nonnull
        private Function<org.opensaml.profile.context.ProfileRequestContext,​ConsentFlowDescriptor> consentFlowDescriptorLookupStrategy
        Consent flow descriptor lookup strategy.
      • attributeReleaseContextLookupStrategy

        @Nonnull
        private Function<org.opensaml.profile.context.ProfileRequestContext,​net.shibboleth.idp.consent.context.AttributeReleaseContext> attributeReleaseContextLookupStrategy
        Strategy used to find the AttributeReleaseContext from the ProfileRequestContext.
      • attributeValuesHashFunction

        @Nonnull
        private Function<Collection<net.shibboleth.idp.attribute.IdPAttributeValue>,​String> attributeValuesHashFunction
        Function used to compute the hash of an attribute's values.
    • Constructor Detail

      • AttributeReleaseConsentFunction

        public AttributeReleaseConsentFunction()
        Constructor.
    • Method Detail

      • setConsentContextLookupStrategy

        public void setConsentContextLookupStrategy​(@Nonnull
                                                    Function<org.opensaml.profile.context.ProfileRequestContext,​net.shibboleth.idp.consent.context.ConsentContext> strategy)
        Set the consent context lookup strategy.
        Parameters:
        strategy - the consent context lookup strategy
      • setConsentFlowDescriptorLookupStrategy

        public void setConsentFlowDescriptorLookupStrategy​(@Nonnull
                                                           Function<org.opensaml.profile.context.ProfileRequestContext,​ConsentFlowDescriptor> strategy)
        Set the consent flow descriptor lookup strategy.
        Parameters:
        strategy - the consent flow descriptor lookup strategy
      • setAttributeReleaseContextLookupStrategy

        public void setAttributeReleaseContextLookupStrategy​(@Nonnull
                                                             Function<org.opensaml.profile.context.ProfileRequestContext,​net.shibboleth.idp.consent.context.AttributeReleaseContext> strategy)
        Set the attribute release context lookup strategy.
        Parameters:
        strategy - the attribute release context lookup strategy
      • setAttributeValuesHashFunction

        public void setAttributeValuesHashFunction​(@Nonnull
                                                   Function<Collection<net.shibboleth.idp.attribute.IdPAttributeValue>,​String> function)
        Set the function used to compute the hash of an attribute's values.
        Parameters:
        function - the function used to compute the hash of an attribute's values
      • apply

        @Nullable
        public Map<String,​net.shibboleth.idp.consent.Consent> apply​(@Nullable
                                                                          org.opensaml.profile.context.ProfileRequestContext input)
        Specified by:
        apply in interface Function<org.opensaml.profile.context.ProfileRequestContext,​Map<String,​net.shibboleth.idp.consent.Consent>>