Class RelyingPartyConfiguration

    • Field Detail

      • log

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

        @Nonnull
        private Predicate<ProfileRequestContext> detailedErrorsPredicate
        Controls whether detailed information about errors should be exposed.
      • activationCondition

        @Nonnull
        private Predicate<ProfileRequestContext> activationCondition
        Predicate that must be true for this configuration to be active for a given request.
    • Constructor Detail

      • RelyingPartyConfiguration

        public RelyingPartyConfiguration()
        Constructor.
    • Method Detail

      • getResponderId

        @Nonnull
        @NotEmpty
        public String getResponderId​(@Nullable
                                     ProfileRequestContext profileRequestContext)
        Get the self-referential ID to use when responding to requests.
        Parameters:
        profileRequestContext - current profile request context
        Returns:
        ID to use when responding
      • setResponderId

        public void setResponderId​(@Nonnull @NotEmpty
                                   String responder)
        Set the self-referential ID to use when responding to messages.
        Parameters:
        responder - ID to use when responding to messages
      • setResponderIdLookupStrategy

        public void setResponderIdLookupStrategy​(@Nonnull
                                                 Function<ProfileRequestContext,​String> strategy)
        Set a lookup strategy for the responderId property.
        Parameters:
        strategy - lookup strategy
        Since:
        3.4.0
      • isDetailedErrors

        public boolean isDetailedErrors​(@Nullable
                                        ProfileRequestContext profileRequestContext)
        Get whether detailed information about errors should be exposed.
        Parameters:
        profileRequestContext - current profile request context
        Returns:
        true iff it is acceptable to expose detailed error information
      • setDetailedErrors

        public void setDetailedErrors​(boolean flag)
        Set whether detailed information about errors should be exposed.
        Parameters:
        flag - flag to set
      • setDetailedErrorsPredicate

        public void setDetailedErrorsPredicate​(@Nonnull
                                               Predicate<ProfileRequestContext> condition)
        Set a condition to determine whether detailed information about errors should be exposed.
        Parameters:
        condition - condition to set
      • getProfileConfiguration

        @Nullable
        public ProfileConfiguration getProfileConfiguration​(@Nullable
                                                            ProfileRequestContext profileRequestContext,
                                                            @Nullable
                                                            String profileId)
        Get the profile configuration, for the relying party, for the given profile. This is a convenience method and is equivalent to calling Map.get(Object) on the return of getProfileConfigurations(ProfileRequestContext). This map contains no null entries, keys, or values.
        Parameters:
        profileRequestContext - current profile request context
        profileId - the ID of the profile
        Returns:
        the configuration for the profile or null if the profile ID was null or empty or there is no configuration for the given profile
      • setProfileConfigurations

        public void setProfileConfigurations​(@Nullable @NonnullElements
                                             Collection<ProfileConfiguration> configs)
        Set the profile configurations for this relying party.
        Parameters:
        configs - the configurations to set
      • setProfileConfigurationsLookupStrategy

        public void setProfileConfigurationsLookupStrategy​(@Nonnull
                                                           Function<ProfileRequestContext,​Map<String,​ProfileConfiguration>> strategy)
        Set a lookup strategy for the profileConfigurations property.
        Parameters:
        strategy - lookup strategy
        Since:
        4.0.0
      • setActivationCondition

        public void setActivationCondition​(@Nonnull
                                           Predicate<ProfileRequestContext> condition)
        Set the condition under which the relying party configuration should be active.
        Parameters:
        condition - the activation condition