Class BrowserSSOProfileConfiguration

    • Constructor Detail

      • BrowserSSOProfileConfiguration

        public BrowserSSOProfileConfiguration()
        Constructor.
      • BrowserSSOProfileConfiguration

        protected BrowserSSOProfileConfiguration​(@Nonnull @NotEmpty
                                                 String profileId)
        Constructor.
        Parameters:
        profileId - unique ID for this profile
    • Method Detail

      • setResolveAttributes

        public void setResolveAttributes​(boolean flag)
        Set whether attributes should be resolved during the profile.
        Parameters:
        flag - flag to set
      • setResolveAttributesPredicate

        public void setResolveAttributesPredicate​(@Nonnull
                                                  Predicate<ProfileRequestContext> condition)
        Set a condition to determine whether attributes should be resolved during the profile.
        Parameters:
        condition - condition to set
      • isIncludeAttributeStatement

        public boolean isIncludeAttributeStatement​(@Nullable
                                                   ProfileRequestContext profileRequestContext)
        Get whether responses to the authentication request should include an attribute statement.

        Default is true

        Parameters:
        profileRequestContext - current profile request context
        Returns:
        whether responses to the authentication request should include an attribute statement
      • setIncludeAttributeStatement

        public void setIncludeAttributeStatement​(boolean flag)
        Set whether responses to the authentication request should include an attribute statement.
        Parameters:
        flag - flag to set
      • setIncludeAttributeStatementPredicate

        public void setIncludeAttributeStatementPredicate​(@Nonnull
                                                          Predicate<ProfileRequestContext> condition)
        Set a condition to determine whether responses to the authentication request should include an attribute statement.
        Parameters:
        condition - condition to set
      • isIgnoreScoping

        public boolean isIgnoreScoping​(@Nullable
                                       ProfileRequestContext profileRequestContext)
        Gets whether Scoping elements in requests should be ignored/omitted.
        Parameters:
        profileRequestContext - current profile request context
        Returns:
        whether Scoping elements in requests should be ignored/omitted
        Since:
        4.0.0
      • setIgnoreScoping

        public void setIgnoreScoping​(boolean flag)
        Sets whether Scoping elements in requests should be ignored/omitted.

        Defaults to false.

        Parameters:
        flag - flag to set
        Since:
        4.0.0
      • setIgnoreScopingPredicate

        public void setIgnoreScopingPredicate​(@Nonnull
                                              Predicate<ProfileRequestContext> condition)
        Sets a condition to determine whether Scoping elements in requests should be ignored/omitted.
        Parameters:
        condition - condition to set
        Since:
        4.0.0
      • isForceAuthn

        public boolean isForceAuthn​(@Nullable
                                    ProfileRequestContext profileRequestContext)
        Get whether the authentication process should include a proof of user presence.
        Specified by:
        isForceAuthn in interface AuthenticationProfileConfiguration
        Parameters:
        profileRequestContext - current profile request context
        Returns:
        true iff authentication should require user presence
      • setForceAuthn

        public void setForceAuthn​(boolean flag)
        Set whether a fresh user presence proof should be required for this request.
        Parameters:
        flag - flag to set
      • setForceAuthnPredicate

        public void setForceAuthnPredicate​(@Nonnull
                                           Predicate<ProfileRequestContext> condition)
        Set a condition to determine whether a fresh user presence proof should be required for this request.
        Parameters:
        condition - condition to set
      • isCheckAddress

        public boolean isCheckAddress​(@Nullable
                                      ProfileRequestContext profileRequestContext)
        Get whether the client's address must match the address in an inbound SubjectLocality element during inbound SSO.
        Parameters:
        profileRequestContext - current profile request context
        Returns:
        whether to compare addresses
        Since:
        4.0.0
      • setCheckAddress

        public void setCheckAddress​(boolean flag)
        Set whether the client's address must match the address in an inbound SubjectLocality element during inbound SSO.
        Parameters:
        flag - flag to set
        Since:
        4.0.0
      • setCheckAddressPredicate

        public void setCheckAddressPredicate​(@Nonnull
                                             Predicate<ProfileRequestContext> condition)
        Set a condition to determine whether the client's address must match the address in an inbound SubjectLocality element during inbound SSO.
        Parameters:
        condition - condition to set
        Since:
        4.0.0
      • isSkipEndpointValidationWhenSigned

        public boolean isSkipEndpointValidationWhenSigned​(@Nullable
                                                          ProfileRequestContext profileRequestContext)
        Get condition to determine whether the response endpoint should be validated if the request is signed.
        Parameters:
        profileRequestContext - current profile request context
        Returns:
        condition
        Since:
        4.0.0
      • setSkipEndpointValidationWhenSigned

        public void setSkipEndpointValidationWhenSigned​(boolean flag)
        Set whether the response endpoint should be validated if the request is signed.
        Parameters:
        flag - flag to set
        Since:
        3.4.0
      • setSkipEndpointValidationWhenSignedPredicate

        public void setSkipEndpointValidationWhenSignedPredicate​(@Nonnull
                                                                 Predicate<ProfileRequestContext> condition)
        Set condition to determine whether the response endpoint should be validated if the request is signed.
        Parameters:
        condition - condition to set
        Since:
        3.4.0
      • isSuppressAuthenticatingAuthority

        public boolean isSuppressAuthenticatingAuthority​(@Nullable
                                                         ProfileRequestContext profileRequestContext)
        Gets whether to suppress inclusion of AuthenticatingAuthority element.

        Defaults to false.

        Parameters:
        profileRequestContext - current profile request context
        Returns:
        true iff the element should be suppressed when possible
        Since:
        4.2.0
      • setSuppressAuthenticatingAuthority

        public void setSuppressAuthenticatingAuthority​(boolean flag)
        Sets whether to suppress inclusion of AuthenticatingAuthority element.

        Defaults to false.

        Parameters:
        flag - flag to set
        Since:
        4.2.0
      • setSuppressAuthenticatingAuthorityPredicate

        public void setSuppressAuthenticatingAuthorityPredicate​(@Nonnull
                                                                Predicate<ProfileRequestContext> condition)
        Sets condition to determine whether to suppress inclusion of AuthenticatingAuthority element.
        Parameters:
        condition - condition to set
        Since:
        4.2.0
      • isProxiedAuthnInstant

        public boolean isProxiedAuthnInstant​(@Nullable
                                             ProfileRequestContext profileRequestContext)
        Gets whether authentication results produced by use of this profile should carry the proxied assertion's AuthnInstant, rather than the current time.

        Defaults to true.

        Parameters:
        profileRequestContext - current profile request context
        Returns:
        whether to proxy across the inbound AuthnInstant
        Since:
        4.0.0
      • setProxiedAuthnInstant

        public void setProxiedAuthnInstant​(boolean flag)
        Sets whether authentication results produced by use of this profile should carry the proxied assertion's AuthnInstant, rather than the current time.
        Parameters:
        flag - flag to set
        Since:
        4.0.0
      • setProxiedAuthnInstantPredicate

        public void setProxiedAuthnInstantPredicate​(@Nonnull
                                                    Predicate<ProfileRequestContext> condition)
        Sets condition to determine whether authentication results produced by use of this profile should carry the proxied assertion's AuthnInstant, rather than the current time.
        Parameters:
        condition - condition to set
        Since:
        4.0.0
      • isRequireSignedRequests

        public boolean isRequireSignedRequests​(@Nullable
                                               ProfileRequestContext profileRequestContext)
        Get whether to require signed requests.
        Parameters:
        profileRequestContext - current profile request context
        Returns:
        whether to require signed requests
        Since:
        4.3.0
      • setRequireSignedRequests

        public void setRequireSignedRequests​(boolean flag)
        Set whether to require signed requests.
        Parameters:
        flag - flag to set
        Since:
        4.3.0
      • setRequireSignedRequestsPredicate

        public void setRequireSignedRequestsPredicate​(@Nonnull
                                                      Predicate<ProfileRequestContext> condition)
        Set a condition to determine whether to require signed requests.
        Parameters:
        condition - condition to set
        Since:
        4.3.0
      • getMaximumSPSessionLifetime

        @Nullable
        public Duration getMaximumSPSessionLifetime​(@Nullable
                                                    ProfileRequestContext profileRequestContext)
        Get the maximum amount of time the service provider should maintain a session for the user based on the authentication assertion. A null or 0 is interpreted as an unlimited lifetime.
        Parameters:
        profileRequestContext - current profile request context
        Returns:
        max lifetime of service provider should maintain a session
      • setMaximumSPSessionLifetime

        public void setMaximumSPSessionLifetime​(@Nullable
                                                Duration lifetime)
        Set the maximum amount of time the service provider should maintain a session for the user based on the authentication assertion. A null or 0 is interpreted as an unlimited lifetime.
        Parameters:
        lifetime - max lifetime of service provider should maintain a session
      • setMaximumSPSessionLifetimeLookupStrategy

        public void setMaximumSPSessionLifetimeLookupStrategy​(@Nonnull
                                                              Function<ProfileRequestContext,​Duration> strategy)
        Set a lookup strategy for the maximum amount of time the service provider should maintain a session for the user.
        Parameters:
        strategy - lookup strategy
        Since:
        3.4.0
      • getMaximumTimeSinceAuthn

        @Nullable
        public Duration getMaximumTimeSinceAuthn​(@Nullable
                                                 ProfileRequestContext profileRequestContext)
        Get the maximum amount of time allowed to have elapsed since an incoming AuthnInstant.

        A null or 0 is interpreted as an unlimited amount.

        Parameters:
        profileRequestContext - current profile request context
        Returns:
        max time since inbound AuthnInstant
        Since:
        4.0.0
      • setMaximumTimeSinceAuthn

        public void setMaximumTimeSinceAuthn​(@Nullable
                                             Duration amount)
        Set the maximum amount of time allowed to have elapsed since an incoming AuthnInstant.

        A null or 0 is interpreted as an unlimited amount.

        Parameters:
        amount - max time to allow
        Since:
        4.0.0
      • setMaximumTimeSinceAuthnLookupStrategy

        public void setMaximumTimeSinceAuthnLookupStrategy​(@Nonnull
                                                           Function<ProfileRequestContext,​Duration> strategy)
        Set a lookup strategy for the maximum amount of time allowed to have elapsed since an incoming AuthnInstant.
        Parameters:
        strategy - lookup strategy
        Since:
        4.0.0
      • isAllowDelegation

        @Nonnull
        public boolean isAllowDelegation​(@Nullable
                                         ProfileRequestContext profileRequestContext)
        Get the predicate used to determine if produced assertions may be delegated.
        Parameters:
        profileRequestContext - current profile request context
        Returns:
        predicate used to determine if produced assertions may be delegated
      • setAllowDelegation

        public void setAllowDelegation​(boolean flag)
        Set whether produced assertions may be delegated.
        Parameters:
        flag - flag to set
      • setAllowDelegationPredicate

        public void setAllowDelegationPredicate​(@Nonnull
                                                Predicate<ProfileRequestContext> predicate)
        Set the predicate used to determine if produced assertions may be delegated.
        Parameters:
        predicate - used to determine if produced assertions may be delegated
      • getMaximumTokenDelegationChainLength

        @NonNegative
        public long getMaximumTokenDelegationChainLength​(@Nullable
                                                         ProfileRequestContext profileRequestContext)
        Get the limits on the total number of delegates that may be derived from the initial SAML token.
        Parameters:
        profileRequestContext - current profile request context
        Returns:
        the limit on the total number of delegates that may be derived from the initial SAML token
      • setMaximumTokenDelegationChainLength

        public void setMaximumTokenDelegationChainLength​(@NonNegative
                                                         long length)
        Set the limits on the total number of delegates that may be derived from the initial SAML token.
        Parameters:
        length - the limit on the total number of delegates that may be derived from the initial SAML token
      • setMaximumTokenDelegationChainLengthLookupStrategy

        public void setMaximumTokenDelegationChainLengthLookupStrategy​(@Nonnull
                                                                       Function<ProfileRequestContext,​Long> strategy)
        Set a lookup strategy for the limits on the total number of delegates that may be derived from the initial SAML token.
        Parameters:
        strategy - lookup strategy
        Since:
        3.4.0
      • getAuthnContextTranslationStrategy

        @Nullable
        public Function<AuthnContext,​Collection<Principal>> getAuthnContextTranslationStrategy​(@Nullable
                                                                                                     ProfileRequestContext profileRequestContext)
        Get the function to use to translate an inbound proxied SAML 2.0 AuthnContext into the appropriate set of custom Principal objects to populate into the subject.
        Parameters:
        profileRequestContext - current profile request context
        Returns:
        translation function
        Since:
        4.0.0
      • setAuthnContextTranslationStrategy

        public void setAuthnContextTranslationStrategy​(@Nullable
                                                       Function<AuthnContext,​Collection<Principal>> strategy)
        Set the function to use to translate an inbound proxied SAML 2.0 AuthnContext into the appropriate set of custom Principal objects to populate into the subject.
        Parameters:
        strategy - translation function
        Since:
        4.0.0
      • setAuthnContextTranslationStrategyLookupStrategy

        public void setAuthnContextTranslationStrategyLookupStrategy​(@Nonnull
                                                                     Function<ProfileRequestContext,​Function<AuthnContext,​Collection<Principal>>> strategy)
        Set a lookup strategy for the function to use to translate an inbound proxied SAML 2.0 AuthnContext into the appropriate set of custom Principal objects to populate into the subject.
        Parameters:
        strategy - lookup strategy
        Since:
        4.0.0
      • getAuthnContextTranslationStrategyEx

        @Nullable
        public Function<ProfileRequestContext,​Collection<Principal>> getAuthnContextTranslationStrategyEx​(@Nullable
                                                                                                                ProfileRequestContext profileRequestContext)
        Get the function to use to translate an inbound proxied response into the appropriate set of custom Principal objects to populate into the subject.

        This differs from the original in that the input is the entire ProfileRequestContext of the proxied authentication state rather than the SAML AuthnContext directly.

        Parameters:
        profileRequestContext - current profile request context
        Returns:
        translation function
        Since:
        4.1.0
      • setAuthnContextTranslationStrategyEx

        public void setAuthnContextTranslationStrategyEx​(@Nullable
                                                         Function<ProfileRequestContext,​Collection<Principal>> strategy)
        Set the function to use to translate an inbound proxied response into the appropriate set of custom Principal objects to populate into the subject.

        This differs from the original in that the input is the entire ProfileRequestContext of the proxied authentication state rather than the SAML AuthnContext directly.

        Parameters:
        strategy - translation function
        Since:
        4.1.0
      • setAuthnContextTranslationStrategyExLookupStrategy

        public void setAuthnContextTranslationStrategyExLookupStrategy​(@Nonnull
                                                                       Function<ProfileRequestContext,​Function<ProfileRequestContext,​Collection<Principal>>> strategy)
        Set a lookup strategy for the function to use to translate an inbound proxied response into the appropriate set of custom Principal objects to populate into the subject.

        This differs from the original in that the input is the entire ProfileRequestContext of the proxied authentication state rather than the SAML AuthnContext directly.

        Parameters:
        strategy - lookup strategy
        Since:
        4.1.0
      • getAuthnContextComparison

        @Nullable
        public AuthnContextComparisonTypeEnumeration getAuthnContextComparison​(@Nullable
                                                                               ProfileRequestContext profileRequestContext)
        Get the comparison operator to use when issuing SAML requests containing requested context classes.
        Parameters:
        profileRequestContext - profile request context
        Returns:
        comparison value or null
        Since:
        4.0.0
      • setAuthnContextComparison

        public void setAuthnContextComparison​(@Nullable
                                              AuthnContextComparisonTypeEnumeration comparison)
        Set the comparison operator to use when issuing SAML requests containing requested context classes.
        Parameters:
        comparison - comparison value or null
        Since:
        4.0.0
      • setAuthnContextComparisonLookupStrategy

        public void setAuthnContextComparisonLookupStrategy​(@Nonnull
                                                            Function<ProfileRequestContext,​String> strategy)
        Set a lookup strategy for the comparison operator to use when issuing SAML requests containing requested context classes.
        Parameters:
        strategy - lookup strategy
        Since:
        4.0.0
      • setDefaultAuthenticationMethods

        public void setDefaultAuthenticationMethods​(@Nullable @NonnullElements
                                                    Collection<AuthnContextClassRefPrincipal> contexts)
        Set the default authentication contexts to use, expressed as custom principals.
        Parameters:
        contexts - default authentication contexts to use
      • setDefaultAuthenticationMethodsLookupStrategy

        public void setDefaultAuthenticationMethodsLookupStrategy​(@Nonnull
                                                                  Function<ProfileRequestContext,​Collection<AuthnContextClassRefPrincipal>> strategy)
        Set a lookup strategy for the authentication contexts to use, expressed as custom principals.
        Parameters:
        strategy - lookup strategy
        Since:
        3.3.0
      • setAuthenticationFlows

        public void setAuthenticationFlows​(@Nullable @NonnullElements
                                           Collection<String> flows)
        Set the authentication flows to use.
        Parameters:
        flows - flow identifiers to use
      • setAuthenticationFlowsLookupStrategy

        public void setAuthenticationFlowsLookupStrategy​(@Nonnull
                                                         Function<ProfileRequestContext,​Set<String>> strategy)
        Set a lookup strategy for the authentication flows to use.
        Parameters:
        strategy - lookup strategy
        Since:
        3.3.0
      • setPostAuthenticationFlows

        public void setPostAuthenticationFlows​(@Nullable @NonnullElements
                                               Collection<String> flows)
        Set the ordered collection of post-authentication interceptor flows to enable.
        Parameters:
        flows - flow identifiers to enable
      • setPostAuthenticationFlowsLookupStrategy

        public void setPostAuthenticationFlowsLookupStrategy​(@Nonnull
                                                             Function<ProfileRequestContext,​Collection<String>> strategy)
        Set a lookup strategy for the post-authentication interceptor flows to enable.
        Parameters:
        strategy - lookup strategy
        Since:
        3.3.0
      • setNameIDFormatPrecedence

        public void setNameIDFormatPrecedence​(@Nonnull @NonnullElements
                                              Collection<String> formats)
        Set the name identifier formats to use.
        Parameters:
        formats - name identifier formats to use
      • setNameIDFormatPrecedenceLookupStrategy

        public void setNameIDFormatPrecedenceLookupStrategy​(@Nonnull
                                                            Function<ProfileRequestContext,​Collection<String>> strategy)
        Set a lookup strategy for the name identifier formats to use.
        Parameters:
        strategy - lookup strategy
        Since:
        3.3.0