Package net.shibboleth.idp.cas.config

# Class AbstractProtocolConfiguration

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

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

Direct Known Subclasses:
  `LoginConfiguration`, `ProxyConfiguration`, `ValidateConfiguration`

public abstract class AbstractProtocolConfiguration extends AbstractInterceptorAwareProfileConfiguration implements AttributeResolvingProfileConfiguration, InitializableComponent
Base class for CAS protocol configuration.

## Field Summary

Fields
Modifier and Type
Field
Description
`private Function<ProfileRequestContext,String>`
`attributeRecipientGroupIDLookupStrategy`
Lookup strategy for attribute recipient group ID.
`static final Duration`
`DEFAULT_TICKET_VALIDITY_PERIOD`
Default ticket validity.
`private final SecurityConfiguration`
`defaultSecurityConfiguration`
Holds default security config object to use.
`static final String`
`PROTOCOL_COUNTER`
CAS base profile counter prefix.
`static final String`
`PROTOCOL_URI`
CAS base protocol URI.
`private Function<ProfileRequestContext,Collection<String>>`
`requestedIdPAttributeNamesLookupStrategy`
Lookup strategy for requested IdP attribute names to pass into resolver.
`private Predicate<ProfileRequestContext>`
`resolveAttributesPredicate`
Whether attributes should be resolved in the course of the profile.
`private Function<ProfileRequestContext,Duration>`
`ticketValidityPeriodLookupStrategy`
Lookup function to supply ticketValidityPeriod property.

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

`DEFAULT_DISALLOWED_FEATURES`

## Constructor Summary

Constructors
Constructor
Description
`AbstractProtocolConfiguration(String profileId)`
Creates a new configuration instance.

## Method Summary

Modifier and Type
Method
Description
`String`
`getAttributeRecipientGroupID(ProfileRequestContext profileRequestContext)`
`protected abstract int`
`getDefaultTicketLength()`
Get default ticket length.
`protected abstract String`
`getDefaultTicketPrefix()`
Get default ticket prefix.
`Collection<String>`
`getRequestedIdPAttributeNames(ProfileRequestContext profileRequestContext)`
`SecurityConfiguration`
`getSecurityConfiguration(ProfileRequestContext profileRequestContext)`
`Duration`
`getTicketValidityPeriod(ProfileRequestContext profileRequestContext)`
Get ticket validity period.
`boolean`
`isResolveAttributes(ProfileRequestContext profileRequestContext)`
`void`
`setAttributeRecipientGroupID(String groupID)`
Set the group of services for which attributes are being resolved.
`void`
`setAttributeRecipientGroupIDLookupStrategy(Function<ProfileRequestContext,String> strategy)`
Set the lookup strategy for the group of services for which attributes are being resolved.
`void`
`setRequestedIdPAttributeNames(Collection<String> names)`
Set `IdPAttribute` names to resolve (if resolving attributes).
`void`
`setRequestedIdPAttributeNamesLookupStrategy(Function<ProfileRequestContext,Collection<String>> strategy)`
Lookup strategy for `IdPAttribute` names to resolve (if resolving attributes).
`void`
`setResolveAttributes(boolean flag)`
Set whether attributes should be resolved during the profile.
`void`
`setResolveAttributesPredicate(Predicate<ProfileRequestContext> condition)`
Set a condition to determine whether attributes should be resolved during the profile.
`void`
`setTicketValidityPeriod(Duration ticketTTL)`
Sets the ticket validity period.
`void`
`setTicketValidityPeriodLookupStrategy(Function<ProfileRequestContext,Duration> strategy)`
Set a lookup strategy for the ticket validity period.

### 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.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, isFeatureDisallowed`

## Field Details

### PROTOCOL_URI

@Nonnull @NotEmpty public static final String PROTOCOL_URI
CAS base protocol URI.

See Also:
  - Constant Field Values

### PROTOCOL_COUNTER

@Nonnull @NotEmpty public static final String PROTOCOL_COUNTER
CAS base profile counter prefix.

See Also:
  - Constant Field Values

### DEFAULT_TICKET_VALIDITY_PERIOD

@Nonnull public static final Duration DEFAULT_TICKET_VALIDITY_PERIOD
Default ticket validity.

### ticketValidityPeriodLookupStrategy

@Nonnull private Function<ProfileRequestContext,Duration> ticketValidityPeriodLookupStrategy
Lookup function to supply ticketValidityPeriod property.

### resolveAttributesPredicate

@Nonnull private Predicate<ProfileRequestContext> resolveAttributesPredicate
Whether attributes should be resolved in the course of the profile.

### requestedIdPAttributeNamesLookupStrategy

@Nonnull private Function<ProfileRequestContext,Collection<String>> requestedIdPAttributeNamesLookupStrategy
Lookup strategy for requested IdP attribute names to pass into resolver.

### attributeRecipientGroupIDLookupStrategy

@Nonnull private Function<ProfileRequestContext,String> attributeRecipientGroupIDLookupStrategy
Lookup strategy for attribute recipient group ID.

### defaultSecurityConfiguration

@Nonnull private final SecurityConfiguration defaultSecurityConfiguration
Holds default security config object to use.

## Constructor Details

### AbstractProtocolConfiguration

public AbstractProtocolConfiguration(@Nonnull @NotEmpty String profileId)
Creates a new configuration instance.

Parameters:
  `profileId` - Unique profile identifier

## Method Details

### getSecurityConfiguration

@Nullable public SecurityConfiguration getSecurityConfiguration(@Nullable ProfileRequestContext profileRequestContext)

Specified by:
  `getSecurityConfiguration` in interface `ProfileConfiguration`
Overrides:
  `getSecurityConfiguration` in class `AbstractProfileConfiguration`

### getTicketValidityPeriod

@ConfigurationSetting(name="ticketValidityPeriod") @Nonnull public Duration getTicketValidityPeriod(@Nullable ProfileRequestContext profileRequestContext)
Get ticket validity period.

Parameters:
  `profileRequestContext` - current profile request context
Returns:
  ticket validity period

### setTicketValidityPeriod

public void setTicketValidityPeriod(@Nonnull Duration ticketTTL)
Sets the ticket validity period.

Parameters:
  `ticketTTL` - ticket validity period

### setTicketValidityPeriodLookupStrategy

public void setTicketValidityPeriodLookupStrategy(@Nonnull Function<ProfileRequestContext,Duration> strategy)
Set a lookup strategy for the ticket validity period.

Parameters:
  `strategy` - lookup strategy
Since:
  3.3.0

### isResolveAttributes

public boolean isResolveAttributes(@Nullable ProfileRequestContext profileRequestContext)

Specified by:
  `isResolveAttributes` in interface `AttributeResolvingProfileConfiguration`

### 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
Since:
  3.3.0

### getRequestedIdPAttributeNames

@Nonnull @Unmodifiable @NotLive public Collection<String> getRequestedIdPAttributeNames(@Nullable ProfileRequestContext profileRequestContext)

Specified by:
  `getRequestedIdPAttributeNames` in interface `AttributeResolvingProfileConfiguration`

### setRequestedIdPAttributeNames

public void setRequestedIdPAttributeNames(@Nullable Collection<String> names)
Set `IdPAttribute` names to resolve (if resolving attributes).

Parameters:
  `names` - `IdPAttribute` names to resolve
Since:
  5.2.0

### setRequestedIdPAttributeNamesLookupStrategy

public void setRequestedIdPAttributeNamesLookupStrategy(@Nonnull Function<ProfileRequestContext,Collection<String>> strategy)
Lookup strategy for `IdPAttribute` names to resolve (if resolving attributes).

Parameters:
  `strategy` - lookup strategy
Since:
  5.2.0

### getAttributeRecipientGroupID

@Nullable public String getAttributeRecipientGroupID(@Nullable ProfileRequestContext profileRequestContext)

Specified by:
  `getAttributeRecipientGroupID` in interface `AttributeResolvingProfileConfiguration`

### setAttributeRecipientGroupID

public void setAttributeRecipientGroupID(@Nullable String groupID)
Set the group of services for which attributes are being resolved.

Parameters:
  `groupID` - group identifier
Since:
  5.2.0

### setAttributeRecipientGroupIDLookupStrategy

public void setAttributeRecipientGroupIDLookupStrategy(@Nonnull Function<ProfileRequestContext,String> strategy)
Set the lookup strategy for the group of services for which attributes are being resolved.

Parameters:
  `strategy` - lookup strategy
Since:
  5.2.0

### getDefaultTicketPrefix

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

Returns:
  prefix

### getDefaultTicketLength

protected abstract int getDefaultTicketLength()
Get default ticket length.

Returns:
  length