Class AbstractNameIDPolicyPredicate

    • Constructor Detail

      • AbstractNameIDPolicyPredicate

        public AbstractNameIDPolicyPredicate()
        Constructor.
    • Method Detail

      • setRequesterIdLookupStrategy

        public void setRequesterIdLookupStrategy​(@Nullable
                                                 Function<ProfileRequestContext,​String> strategy)
        Set the strategy used to locate the requester ID.
        Parameters:
        strategy - lookup strategy
      • setResponderIdLookupStrategy

        public void setResponderIdLookupStrategy​(@Nullable
                                                 Function<ProfileRequestContext,​String> strategy)
        Set the strategy used to locate the responder ID.
        Parameters:
        strategy - lookup strategy
      • setObjectLookupStrategy

        public void setObjectLookupStrategy​(@Nullable
                                            Function<ProfileRequestContext,​SAMLObject> strategy)
        Set the lookup strategy used to locate the object to evaluate.
        Parameters:
        strategy - lookup function
      • setFormats

        public void setFormats​(@Nullable
                               Collection<String> newFormats)
        Set the formats to apply the predicate to.
        Parameters:
        newFormats - formats to apply predicate to
      • doApply

        private boolean doApply​(@Nullable
                                ProfileRequestContext input,
                                @Nonnull
                                NameIdentifier target)
        Apply policy to the target object.
        Parameters:
        input - current profile request context
        target - target object
        Returns:
        result of policy
      • doApply

        private boolean doApply​(@Nullable
                                ProfileRequestContext input,
                                @Nonnull
                                NameID target)
        Apply policy to the target object.
        Parameters:
        input - current profile request context
        target - target object
        Returns:
        result of policy
      • doApply

        private boolean doApply​(@Nullable
                                ProfileRequestContext input,
                                @Nonnull
                                NameIDPolicy target)
        Apply policy to the target object.
        Parameters:
        input - current profile request context
        target - target object
        Returns:
        result of policy
      • doApply

        protected abstract boolean doApply​(@Nullable
                                           String requesterId,
                                           @Nullable
                                           String responderId,
                                           @Nullable
                                           String format,
                                           @Nullable
                                           String nameQualifier,
                                           @Nullable
                                           String spNameQualifier)
        Apply the predicate to the request.
        Parameters:
        requesterId - the requester
        responderId - the responder
        format - format of identifier
        nameQualifier - the NameQualifier
        spNameQualifier - the SPNameQualifier
        Returns:
        true iff the combination of inputs satisfies a policy