Package net.shibboleth.idp.saml.profile.config.impl

# Class AbstractSAMLProfileConfiguration

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.saml.profile.config.impl.AbstractSAMLProfileConfiguration

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

Direct Known Subclasses:
  `AbstractSAML1ArtifactAwareProfileConfiguration`, `AbstractSAML2ProfileConfiguration`, `ArtifactResolutionProfileConfiguration`

public abstract class AbstractSAMLProfileConfiguration extends AbstractInterceptorAwareProfileConfiguration implements SAMLProfileConfiguration
Base class for SAML profile configurations.

## Field Summary

Fields
Modifier and Type
Field
Description
`private Function<MessageContext,Function<MessageContext,Exception>>`
`messageHandlerLookupStrategy`
Lookup strategy for message decorator.
`private Predicate<ProfileRequestContext>`
`signRequestsPredicate`
Predicate used to determine if the generated request should be signed.
`private Predicate<ProfileRequestContext>`
`signResponsesPredicate`
Predicate used to determine if the generated response should be signed.

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

`DEFAULT_DISALLOWED_FEATURES`

## Constructor Summary

Constructors
Constructor
Description
`AbstractSAMLProfileConfiguration(String profileId)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`Function<MessageContext,Exception>`
`getMessageHandler(MessageContext messageContext)`
`boolean`
`isSignRequests(ProfileRequestContext profileRequestContext)`
`boolean`
`isSignResponses(ProfileRequestContext profileRequestContext)`
`void`
`setMessageDecorator(Function<MessageContext,Exception> handler)`
Deprecated, for removal: This API element is subject to removal in a future version.
`void`
`setMessageHandler(Function<MessageContext,Exception> handler)`
Set a handler for the SAML message.
`void`
`setMessageHandlerLookupStrategy(Function<MessageContext,Function<MessageContext,Exception>> strategy)`
Set a lookup strategy for the handler for the SAML message.
`void`
`setSignRequests(boolean flag)`
Set whether generated requests should be signed.
`void`
`setSignRequestsPredicate(Predicate<ProfileRequestContext> predicate)`
Set the predicate used to determine if generated requests should be signed.
`void`
`setSignResponses(boolean flag)`
Set whether generated responses should be signed.
`void`
`setSignResponsesPredicate(Predicate<ProfileRequestContext> predicate)`
Set the predicate used to determine if generated responses should be signed.

### 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.shared.component.IdentifiedComponent

`getId`

### Methods inherited from interface net.shibboleth.idp.profile.config.InterceptorAwareProfileConfiguration

`getInboundInterceptorFlows, getOutboundInterceptorFlows`

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

`getDisallowedFeatures, getSecurityConfiguration, isFeatureDisallowed`

## Field Details

### signRequestsPredicate

@Nonnull private Predicate<ProfileRequestContext> signRequestsPredicate
Predicate used to determine if the generated request should be signed. Default returns false.

### signResponsesPredicate

@Nonnull private Predicate<ProfileRequestContext> signResponsesPredicate
Predicate used to determine if the generated response should be signed. Default returns false.

### messageHandlerLookupStrategy

@Nonnull private Function<MessageContext,Function<MessageContext,Exception>> messageHandlerLookupStrategy
Lookup strategy for message decorator.

## Constructor Details

### AbstractSAMLProfileConfiguration

public AbstractSAMLProfileConfiguration(@Nonnull @NotEmpty String profileId)
Constructor.

Parameters:
  `profileId` - ID of the communication profile

## Method Details

### isSignRequests

public boolean isSignRequests(@Nullable ProfileRequestContext profileRequestContext)

Specified by:
  `isSignRequests` in interface `SAMLProfileConfiguration`

### setSignRequests

public void setSignRequests(boolean flag)
Set whether generated requests should be signed.

Parameters:
  `flag` - flag to set

### setSignRequestsPredicate

public void setSignRequestsPredicate(@Nonnull Predicate<ProfileRequestContext> predicate)
Set the predicate used to determine if generated requests should be signed.

Parameters:
  `predicate` - predicate used to determine if generated requests should be signed
Since:
  4.0.0

### isSignResponses

public boolean isSignResponses(@Nullable ProfileRequestContext profileRequestContext)

Specified by:
  `isSignResponses` in interface `SAMLProfileConfiguration`

### setSignResponses

public void setSignResponses(boolean flag)
Set whether generated responses should be signed.

Parameters:
  `flag` - flag to set

### setSignResponsesPredicate

public void setSignResponsesPredicate(@Nonnull Predicate<ProfileRequestContext> predicate)
Set the predicate used to determine if generated responses should be signed.

Parameters:
  `predicate` - predicate used to determine if generated responses should be signed
Since:
  4.0.0

### getMessageHandler

@Nullable public Function<MessageContext,Exception> getMessageHandler(@Nullable MessageContext messageContext)

Specified by:
  `getMessageHandler` in interface `SAMLProfileConfiguration`

### setMessageHandler

public void setMessageHandler(@Nullable Function<MessageContext,Exception> handler)
Set a handler for the SAML message.

Parameters:
  `handler` - message handler
Since:
  5.0.0

### setMessageDecorator

@Deprecated(forRemoval=true, since="5.0.0") public void setMessageDecorator(@Nullable Function<MessageContext,Exception> handler)
Deprecated, for removal: This API element is subject to removal in a future version.
Set a handler for the SAML message.

Parameters:
  `handler` - message handler
Since:
  5.0.0

### setMessageHandlerLookupStrategy

public void setMessageHandlerLookupStrategy(@Nonnull Function<MessageContext,Function<MessageContext,Exception>> strategy)
Set a lookup strategy for the handler for the SAML message.

Parameters:
  `strategy` - lookup strategy
Since:
  5.0.0