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

# Class IncludeAttributeStatementPredicate

java.lang.Object
net.shibboleth.profile.context.logic.AbstractRelyingPartyPredicate
net.shibboleth.idp.saml.profile.config.logic.IncludeAttributeStatementPredicate

All Implemented Interfaces:
  `Predicate<ProfileRequestContext>`

public class IncludeAttributeStatementPredicate extends AbstractRelyingPartyPredicate
A predicate that evaluates a SSO `ProfileRequestContext` and determines whether an attribute statement should be included in the outgoing assertion.

The "includeAttributeStatement" profile configuration flag is the main setting governing this decision, but is overridden to "true" in the case that the outgoing `SAMLBindingContext` indicates the outbound binding is an artifact mechanism.

## Field Summary

Fields
Modifier and Type
Field
Description
`private Function<ProfileRequestContext,SAMLBindingContext>`
`bindingContextLookupStrategy`
Strategy function for access to `SAMLBindingContext` to populate.

## Constructor Summary

Constructors
Constructor
Description
`IncludeAttributeStatementPredicate()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`private boolean`
`isArtifactBinding(ProfileRequestContext profileRequestContext)`
Returns true iff the SAML binding is an artifact variant.
`void`
`setBindingContextLookupStrategy(Function<ProfileRequestContext,SAMLBindingContext> strategy)`
Set lookup strategy for `SAMLBindingContext` to examine.
`boolean`
`test(ProfileRequestContext input)`

### Methods inherited from class net.shibboleth.profile.context.logic.AbstractRelyingPartyPredicate

`getRelyingPartyContext, getRelyingPartyContextLookupStrategy, setRelyingPartyContextLookupStrategy`

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

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

### Methods inherited from interface java.util.function.Predicate

`and, negate, or`

## Field Details

### bindingContextLookupStrategy

@Nonnull private Function<ProfileRequestContext,SAMLBindingContext> bindingContextLookupStrategy
Strategy function for access to `SAMLBindingContext` to populate.

## Constructor Details

### IncludeAttributeStatementPredicate

public IncludeAttributeStatementPredicate()
Constructor.

## Method Details

### setBindingContextLookupStrategy

public void setBindingContextLookupStrategy(@Nonnull Function<ProfileRequestContext,SAMLBindingContext> strategy)
Set lookup strategy for `SAMLBindingContext` to examine.

Parameters:
  `strategy` - lookup strategy

### test

public boolean test(@Nullable ProfileRequestContext input)

### isArtifactBinding

private boolean isArtifactBinding(@Nullable ProfileRequestContext profileRequestContext)
Returns true iff the SAML binding is an artifact variant.

Parameters:
  `profileRequestContext` - profile request context
Returns:
  true iff the SAML binding is an artifact variant