Class MockAuthenticationProfileConfiguration

All Implemented Interfaces:
AuthenticationProfileConfiguration, InterceptorAwareProfileConfiguration, ConditionalProfileConfiguration, ProfileConfiguration, Component, DestructableComponent, IdentifiableComponent, IdentifiedComponent, InitializableComponent

public class MockAuthenticationProfileConfiguration extends AbstractInterceptorAwareProfileConfiguration implements AuthenticationProfileConfiguration
Mock implementation of AuthenticationProfileConfiguration.
  • Field Details

    • defaultAuthenticationMethods

      @Nonnull private List<Principal> defaultAuthenticationMethods
      Selects, and limits, the authentication methods to use for requests.
    • authenticationFlows

      @Nonnull private Set<String> authenticationFlows
      Filters the usable authentication flows.
    • postAuthenticationFlows

      @Nonnull private List<String> postAuthenticationFlows
      Enables post-authentication interceptor flows.
    • nameIDFormatPrecedence

      @Nonnull private List<String> nameIDFormatPrecedence
      Precedence of name identifier formats to use for requests.
    • forceAuthnPredicate

      @Nonnull private Predicate<ProfileRequestContext> forceAuthnPredicate
      ForceAuthn predicate.
    • proxyCount

      private Integer proxyCount
      Proxy count.
  • Constructor Details

    • MockAuthenticationProfileConfiguration

      public MockAuthenticationProfileConfiguration(@Nonnull @NotEmpty String id, @Nonnull List<Principal> methods)
      Constructor.
      Parameters:
      id - ID of this profile
      methods - default authentication methods to use
    • MockAuthenticationProfileConfiguration

      public MockAuthenticationProfileConfiguration(@Nonnull @NotEmpty String id, @Nonnull List<Principal> methods, @Nonnull Collection<String> flows, @Nonnull List<String> formats)
      Constructor.
      Parameters:
      id - ID of this profile
      methods - default authentication methods to use
      flows - ...
      formats - name identifier formats to use
  • Method Details

    • getDefaultAuthenticationMethods

      @Nonnull @NotLive @Unmodifiable public List<Principal> getDefaultAuthenticationMethods(@Nullable ProfileRequestContext profileRequestContext)
      Get the default authentication methods to use, expressed as custom principals.
      Specified by:
      getDefaultAuthenticationMethods in interface AuthenticationProfileConfiguration
      Parameters:
      profileRequestContext - current profile request context
      Returns:
      default authentication methods to use
    • setDefaultAuthenticationMethods

      public void setDefaultAuthenticationMethods(@Nonnull List<Principal> methods)
      Set the default authentication methods to use, expressed as custom principals.
      Parameters:
      methods - default authentication methods to use
    • getNameIDFormatPrecedence

      @Nonnull @NotLive @Unmodifiable public List<String> getNameIDFormatPrecedence(@Nullable ProfileRequestContext profileRequestContext)
      Get the name identifier formats to use.
      Parameters:
      profileRequestContext - profile request context
      Returns:
      formats to use
    • setNameIDFormatPrecedence

      public void setNameIDFormatPrecedence(@Nonnull List<String> formats)
      Set the name identifier formats to use.
      Parameters:
      formats - name identifier formats to use
    • getAuthenticationFlows

      @Nonnull @NotLive @Unmodifiable public Set<String> getAuthenticationFlows(@Nullable ProfileRequestContext profileRequestContext)
      Get the allowable authentication flows for this profile.

      The flow IDs returned MUST NOT contain the AuthenticationFlowDescriptor.FLOW_ID_PREFIX prefix common to all interceptor flows.

      Specified by:
      getAuthenticationFlows in interface AuthenticationProfileConfiguration
      Parameters:
      profileRequestContext - current profile request context
      Returns:
      a set of authentication flow IDs to allow
    • setAuthenticationFlows

      public void setAuthenticationFlows(@Nonnull Collection<String> flows)
      Set the authentication flows to use.
      Parameters:
      flows - flow identifiers to use
    • getPostAuthenticationFlows

      @Nonnull @NotLive @Unmodifiable public List<String> getPostAuthenticationFlows(@Nullable ProfileRequestContext profileRequestContext)
      Get an ordered list of post-authentication interceptor flows to run for this profile.

      The flow IDs returned MUST NOT contain the ProfileInterceptorFlowDescriptor.FLOW_ID_PREFIX prefix common to all interceptor flows.

      Specified by:
      getPostAuthenticationFlows in interface AuthenticationProfileConfiguration
      Parameters:
      profileRequestContext - current profile request context
      Returns:
      a set of interceptor flow IDs to enable
    • setPostAuthenticationFlows

      public void setPostAuthenticationFlows(@Nonnull Collection<String> flows)
      Set the ordered collection of post-authentication interceptor flows to enable.
      Parameters:
      flows - flow identifiers to enable
    • 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
    • getProxyCount

      @Nullable @NonNegative public Integer getProxyCount(@Nullable ProfileRequestContext profileRequestContext)
      Gets the maximum number of times an assertion may be proxied outbound and/or the maximum number of hops between the relying party and a proxied authentication authority inbound.
      Specified by:
      getProxyCount in interface AuthenticationProfileConfiguration
      Parameters:
      profileRequestContext - current profile request context
      Returns:
      maximum number of times an assertion or authentication may be proxied
    • setProxyCount

      public void setProxyCount(@Nullable @NonNegative Integer count)
      Set proxy count.
      Parameters:
      count - the count