Package net.shibboleth.idp.cas.config

# Class LoginConfiguration

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.cas.config.AbstractProtocolConfiguration
net.shibboleth.idp.cas.config.LoginConfiguration

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

public class LoginConfiguration extends AbstractProtocolConfiguration implements AuthenticationProfileConfiguration
CAS protocol configuration that applies to the `/login` URI.

## Field Summary

Fields
Modifier and Type
Field
Description
`private Function<ProfileRequestContext,Set<String>>`
`authenticationFlowsLookupStrategy`
Lookup function to supply authenticationFlows property.
`static final int`
`DEFAULT_TICKET_LENGTH`
Default ticket length (random part).
`static final String`
`DEFAULT_TICKET_PREFIX`
Default ticket prefix.
`private Function<ProfileRequestContext,Collection<Principal>>`
`defaultAuthenticationContextsLookupStrategy`
Lookup function to supply defaultAuthenticationContexts property.
`private Predicate<ProfileRequestContext>`
`forceAuthnPredicate`
Whether to mandate forced authentication for the request.
`private Function<ProfileRequestContext,Duration>`
`maxAgeLookupStrategy`
Lookup function for max-age setting.
`private Function<ProfileRequestContext,Collection<String>>`
`postAuthenticationFlowsLookupStrategy`
Lookup function to supply postAuthenticationFlows property.
`static final String`
`PROFILE_COUNTER`
Proxy ticket profile counter name.
`static final String`
`PROFILE_ID`
Proxy ticket profile URI.
`private Function<ProfileRequestContext,Integer>`
`proxyCountLookupStrategy`
Lookup function to supply proxyCount property.
`private Predicate<ProfileRequestContext>`
`storeConsentInTicketsPredicate`
Whether to store consent in service tickets.

### Fields inherited from class net.shibboleth.idp.cas.config.AbstractProtocolConfiguration

`DEFAULT_TICKET_VALIDITY_PERIOD, PROTOCOL_COUNTER, PROTOCOL_URI`

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

`DEFAULT_DISALLOWED_FEATURES`

## Constructor Summary

Constructors
Constructor
Description
`LoginConfiguration()`
Creates a new instance.

## Method Summary

Modifier and Type
Method
Description
`Set<String>`
`getAuthenticationFlows(ProfileRequestContext profileRequestContext)`
Deprecated, for removal: This API element is subject to removal in a future version.
`List<Principal>`
`getDefaultAuthenticationMethods(ProfileRequestContext profileRequestContext)`
Get the default authentication methods to use, expressed as custom principals.
`protected int`
`getDefaultTicketLength()`
Get default ticket length.
`protected String`
`getDefaultTicketPrefix()`
Get default ticket prefix.
`Duration`
`getMaxAge(ProfileRequestContext profileRequestContext)`
Get duration since an `AuthenticationResult` was created that allows it to be reused for this request.
`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.
`boolean`
`isStoreConsentInTickets(ProfileRequestContext profileRequestContext)`
Get whether to store consent in service tickets.
`void`
`setAuthenticationFlows(Collection<String> flows)`
Deprecated, for removal: This API element is subject to removal in a future version.
`void`
`setAuthenticationFlowsLookupStrategy(Function<ProfileRequestContext,Set<String>> strategy)`
Deprecated, for removal: This API element is subject to removal in a future version.
`void`
`setDefaultAuthenticationMethods(Collection<Principal> contexts)`
Set the default authentication contexts to use, expressed as custom principals.
`void`
`setDefaultAuthenticationMethodsLookupStrategy(Function<ProfileRequestContext,Collection<Principal>> strategy)`
Set a lookup strategy for the default authentication contexts to use.
`void`
`setForceAuthn(boolean flag)`
Set whether a fresh user presence proof should be required for this request.
`void`
`setForceAuthnPredicate(Predicate<ProfileRequestContext> condition)`
Set a condition to determine whether a fresh user presence proof should be required for this request.
`void`
`setMaxAge(Duration maxAge)`
Sets allowed duration between an `AuthenticationResult` creation and its reuse for this request.
`void`
`setMaxAgeLookupStrategy(Function<ProfileRequestContext,Duration> strategy)`
Sets lookup strategy for the allowed duration between an `AuthenticationResult` creation and its reuse for this request.
`void`
`setPostAuthenticationFlows(Collection<String> flows)`
Set the ordered collection of post-authentication interceptor flows to enable.
`void`
`setPostAuthenticationFlowsLookupStrategy(Function<ProfileRequestContext,Collection<String>> strategy)`
Set a lookup strategy for the post-authentication interceptor flows to enable.
`void`
`setProxyCount(Integer count)`
Sets 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.
`void`
`setProxyCountLookupStrategy(Function<ProfileRequestContext,Integer> strategy)`
Set a lookup strategy for 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.
`void`
`setStoreConsentInTickets(boolean flag)`
Set whether to store consent in service tickets.
`void`
`setStoreConsentInTicketsPredicate(Predicate<ProfileRequestContext> condition)`
Set condition for whether to store consent in service tickets.

### Methods inherited from class net.shibboleth.idp.cas.config.AbstractProtocolConfiguration

`getAttributeRecipientGroupID, getRequestedIdPAttributeNames, getSecurityConfiguration, getTicketValidityPeriod, isResolveAttributes, setAttributeRecipientGroupID, setAttributeRecipientGroupIDLookupStrategy, setRequestedIdPAttributeNames, setRequestedIdPAttributeNamesLookupStrategy, setResolveAttributes, setResolveAttributesPredicate, setTicketValidityPeriod, setTicketValidityPeriodLookupStrategy`

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

`isLocal`

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

`getId`

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

`initialize, isInitialized`

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

`getDisallowedFeatures, getSecurityConfiguration, isFeatureDisallowed`

## Field Details

### PROFILE_ID

@Nonnull @NotEmpty public static final String PROFILE_ID
Proxy ticket profile URI.

See Also:
  - Constant Field Values

### PROFILE_COUNTER

@Nonnull @NotEmpty public static final String PROFILE_COUNTER
Proxy ticket profile counter name.

See Also:
  - Constant Field Values

### DEFAULT_TICKET_PREFIX

@Nonnull @NotEmpty public static final String DEFAULT_TICKET_PREFIX
Default ticket prefix.

See Also:
  - Constant Field Values

### DEFAULT_TICKET_LENGTH

public static final int DEFAULT_TICKET_LENGTH
Default ticket length (random part).

See Also:
  - Constant Field Values

### authenticationFlowsLookupStrategy

@Nonnull private Function<ProfileRequestContext,Set<String>> authenticationFlowsLookupStrategy
Lookup function to supply authenticationFlows property.

### postAuthenticationFlowsLookupStrategy

@Nonnull private Function<ProfileRequestContext,Collection<String>> postAuthenticationFlowsLookupStrategy
Lookup function to supply postAuthenticationFlows property.

### defaultAuthenticationContextsLookupStrategy

@Nonnull private Function<ProfileRequestContext,Collection<Principal>> defaultAuthenticationContextsLookupStrategy
Lookup function to supply defaultAuthenticationContexts property.

### forceAuthnPredicate

@Nonnull private Predicate<ProfileRequestContext> forceAuthnPredicate
Whether to mandate forced authentication for the request.

### maxAgeLookupStrategy

@Nonnull private Function<ProfileRequestContext,Duration> maxAgeLookupStrategy
Lookup function for max-age setting.

### storeConsentInTicketsPredicate

@Nonnull private Predicate<ProfileRequestContext> storeConsentInTicketsPredicate
Whether to store consent in service tickets.

### proxyCountLookupStrategy

@Nonnull private Function<ProfileRequestContext,Integer> proxyCountLookupStrategy
Lookup function to supply proxyCount property.

## Constructor Details

### LoginConfiguration

public LoginConfiguration()
Creates a new instance.

## 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(@Nullable Collection<Principal> 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<Principal>> strategy)
Set a lookup strategy for the default authentication contexts to use.

Parameters:
  `strategy` - lookup strategy

### getAuthenticationFlows

@Deprecated(since="5.2.0", forRemoval=true) @Nonnull @NotLive @Unmodifiable public Set<String> getAuthenticationFlows(@Nullable ProfileRequestContext profileRequestContext)
Deprecated, for removal: This API element is subject to removal in a future version.
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

@Deprecated(since="5.2.0", forRemoval=true) public void setAuthenticationFlows(@Nullable Collection<String> flows)
Deprecated, for removal: This API element is subject to removal in a future version.
Set the authentication flows to use.

Parameters:
  `flows` - flow identifiers to use

### setAuthenticationFlowsLookupStrategy

@Deprecated(since="5.2.0", forRemoval=true) public void setAuthenticationFlowsLookupStrategy(@Nonnull Function<ProfileRequestContext,Set<String>> strategy)
Deprecated, for removal: This API element is subject to removal in a future version.
Set a lookup strategy for the authentication flows to use.

Parameters:
  `strategy` - lookup strategy

### 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(@Nullable 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

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

### getMaxAge

@ConfigurationSetting(name="maxAge") @Nullable public Duration getMaxAge(@Nullable ProfileRequestContext profileRequestContext)
Get duration since an `AuthenticationResult` was created that allows it to be reused for this request.

If null, no constraint is applied.

Specified by:
  `getMaxAge` in interface `AuthenticationProfileConfiguration`
Parameters:
  `profileRequestContext` - profile request context
Returns:
  allowable duration

### setMaxAge

public void setMaxAge(@Nullable Duration maxAge)
Sets allowed duration between an `AuthenticationResult` creation and its reuse for this request.

Parameters:
  `maxAge` - allowed duration
Since:
  5.2.0

### setMaxAgeLookupStrategy

public void setMaxAgeLookupStrategy(@Nonnull Function<ProfileRequestContext,Duration> strategy)
Sets lookup strategy for the allowed duration between an `AuthenticationResult` creation and its reuse for this request.

Parameters:
  `strategy` - lookup strategy
Since:
  5.2.0

### isStoreConsentInTickets

@ConfigurationSetting(name="storeConsentInTickets") public boolean isStoreConsentInTickets(@Nullable ProfileRequestContext profileRequestContext)
Get whether to store consent in service tickets.

Parameters:
  `profileRequestContext` - profile request context
Returns:
  whether to store consent in service tickets
Since:
  4.2.0

### setStoreConsentInTickets

public void setStoreConsentInTickets(boolean flag)
Set whether to store consent in service tickets.

Parameters:
  `flag` - flag to set
Since:
  4.2.0

### setStoreConsentInTicketsPredicate

public void setStoreConsentInTicketsPredicate(@Nonnull Predicate<ProfileRequestContext> condition)
Set condition for whether to store consent in service tickets.

Parameters:
  `condition` - condition to set
Since:
  4.2.0

### getProxyCount

@Nullable 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)
Sets 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.

Parameters:
  `count` - proxy count
Since:
  4.0.0

### setProxyCountLookupStrategy

public void setProxyCountLookupStrategy(@Nonnull Function<ProfileRequestContext,Integer> strategy)
Set a lookup strategy for 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.

Parameters:
  `strategy` - lookup strategy
Since:
  4.0.0

### getDefaultTicketPrefix

@Nonnull @NotEmpty protected String getDefaultTicketPrefix()
Get default ticket prefix.

Specified by:
  `getDefaultTicketPrefix` in class `AbstractProtocolConfiguration`
Returns:
  prefix

### getDefaultTicketLength

protected int getDefaultTicketLength()
Get default ticket length.

Specified by:
  `getDefaultTicketLength` in class `AbstractProtocolConfiguration`
Returns:
  length