Class IsAttributeRequiredPredicate

  • All Implemented Interfaces:
    Predicate<net.shibboleth.idp.attribute.IdPAttribute>, net.shibboleth.utilities.java.support.logic.Predicate<net.shibboleth.idp.attribute.IdPAttribute>

    public class IsAttributeRequiredPredicate
    extends Object
    implements net.shibboleth.utilities.java.support.logic.Predicate<net.shibboleth.idp.attribute.IdPAttribute>
    Predicate that determines whether an IdP attribute is required by the requester.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Function<org.opensaml.saml.common.messaging.context.SAMLMetadataContext,​org.opensaml.saml.saml2.metadata.AttributeConsumingService> acsLookupStrategy
      Strategy used to find the AttributeConsumingService from the SAMLMetadataContext.
      private Logger log
      Class logger.
      private Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.common.messaging.context.SAMLMetadataContext> metadataContextLookupStrategy
      Strategy used to find the SAMLMetadataContext from the ProfileRequestContext.
      private Multimap<String,​net.shibboleth.idp.attribute.IdPAttribute> requestedAttributesMap
      Map of requested attributes.
    • Constructor Summary

      Constructors 
      Constructor Description
      IsAttributeRequiredPredicate​(javax.servlet.http.HttpServletRequest request)
      Constructor.
    • Field Detail

      • log

        @Nonnull
        private final Logger log
        Class logger.
      • metadataContextLookupStrategy

        @Nonnull
        private Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.common.messaging.context.SAMLMetadataContext> metadataContextLookupStrategy
        Strategy used to find the SAMLMetadataContext from the ProfileRequestContext.
      • acsLookupStrategy

        @Nonnull
        private Function<org.opensaml.saml.common.messaging.context.SAMLMetadataContext,​org.opensaml.saml.saml2.metadata.AttributeConsumingService> acsLookupStrategy
        Strategy used to find the AttributeConsumingService from the SAMLMetadataContext.
      • requestedAttributesMap

        @Nullable
        private final Multimap<String,​net.shibboleth.idp.attribute.IdPAttribute> requestedAttributesMap
        Map of requested attributes.
    • Constructor Detail

      • IsAttributeRequiredPredicate

        public IsAttributeRequiredPredicate​(@Nullable
                                            javax.servlet.http.HttpServletRequest request)
        Constructor.
        Parameters:
        request - the HTTP request
    • Method Detail

      • getProfileRequestContext

        @Nullable
        protected org.opensaml.profile.context.ProfileRequestContext getProfileRequestContext​(@Nullable
                                                                                              javax.servlet.http.HttpServletRequest httpRequest)
        Get the profile request context from the HTTP servlet request.
        Parameters:
        httpRequest - the HTTP request
        Returns:
        the profile request context or null
      • getRequestedAttributes

        @Nullable
        protected Multimap<String,​net.shibboleth.idp.attribute.IdPAttribute> getRequestedAttributes​(@Nullable
                                                                                                          org.opensaml.profile.context.ProfileRequestContext prc)
        Get the map of requested attributes from the profile request context.
        Parameters:
        prc - the profile request context
        Returns:
        the map of requested attributes or null
      • test

        public boolean test​(@Nullable
                            net.shibboleth.idp.attribute.IdPAttribute input)
        Specified by:
        test in interface Predicate<net.shibboleth.idp.attribute.IdPAttribute>