Package net.shibboleth.idp.authn.testing

# Class MockAuthenticationProfileConfiguration

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.profile.config.AbstractProfileConfiguration
net.shibboleth.profile.config.AbstractConditionalProfileConfiguration
net.shibboleth.idp.profile.config.AbstractInterceptorAwareProfileConfiguration
net.shibboleth.idp.authn.testing.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 Summary

Fields
Modifier and Type
Field
Description
`private Set<String>`
`authenticationFlows`
Filters the usable authentication flows.
`private List<Principal>`
`defaultAuthenticationMethods`
Selects, and limits, the authentication methods to use for requests.
`private Predicate<ProfileRequestContext>`
`forceAuthnPredicate`
ForceAuthn predicate.
`private List<String>`
`nameIDFormatPrecedence`
Precedence of name identifier formats to use for requests.
`private List<String>`
`postAuthenticationFlows`
Enables post-authentication interceptor flows.
`private Integer`
`proxyCount`
Proxy count.

### Fields inherited from interface net.shibboleth.profile.config.ProfileConfiguration

`DEFAULT_DISALLOWED_FEATURES`

## Constructor Summary

Constructors
Constructor
Description
`MockAuthenticationProfileConfiguration(String id, List<Principal> methods)`
Constructor.
`MockAuthenticationProfileConfiguration(String id, List<Principal> methods, Collection<String> flows, List<String> formats)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`Set<String>`
`getAuthenticationFlows(ProfileRequestContext profileRequestContext)`
Get the allowable authentication flows for this profile.
`List<Principal>`
`getDefaultAuthenticationMethods(ProfileRequestContext profileRequestContext)`
Get the default authentication methods to use, expressed as custom principals.
`List<String>`
`getNameIDFormatPrecedence(ProfileRequestContext profileRequestContext)`
Get the name identifier formats to use.
`List<String>`
`getPostAuthenticationFlows(ProfileRequestContext profileRequestContext)`
Get an ordered list of post-authentication interceptor flows to run for this profile.
`Integer`
`getProxyCount(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.
`boolean`
`isForceAuthn(ProfileRequestContext profileRequestContext)`
Get whether the authentication process should include a proof of user presence.
`void`
`setAuthenticationFlows(Collection<String> flows)`
Set the authentication flows to use.
`void`
`setDefaultAuthenticationMethods(List<Principal> methods)`
Set the default authentication methods to use, expressed as custom principals.
`void`
`setNameIDFormatPrecedence(List<String> formats)`
Set the name identifier formats to use.
`void`
`setPostAuthenticationFlows(Collection<String> flows)`
Set the ordered collection of post-authentication interceptor flows to enable.
`void`
`setProxyCount(Integer count)`
Set proxy count.

### Methods inherited from class net.shibboleth.idp.profile.config.AbstractInterceptorAwareProfileConfiguration

`getInboundInterceptorFlows, getOutboundInterceptorFlows, setInboundInterceptorFlows, setInboundInterceptorFlowsLookupStrategy, setOutboundInterceptorFlows, setOutboundInterceptorFlowsLookupStrategy`

### Methods inherited from class net.shibboleth.profile.config.AbstractConditionalProfileConfiguration

`getActivationCondition, setActivationCondition`

### Methods inherited from class net.shibboleth.profile.config.AbstractProfileConfiguration

`equals, getDisallowedFeatures, getSecurityConfiguration, hashCode, isFeatureDisallowed, setDisallowedFeatures, setDisallowedFeaturesLookupStrategy, setSecurityConfiguration, setSecurityConfigurationLookupStrategy`

### Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent

`setId`

### Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent

`doInitialize, ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException`

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, initialize, isDestroyed, isInitialized`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface net.shibboleth.idp.authn.config.AuthenticationProfileConfiguration

`getMaxAge, isLocal`

### Methods inherited from interface net.shibboleth.shared.component.IdentifiedComponent

`getId`

### Methods inherited from interface net.shibboleth.profile.config.ProfileConfiguration

`getDisallowedFeatures, getSecurityConfiguration, isFeatureDisallowed`

## 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