Package org.opensaml.saml.saml2.profile

# Class SAML2ActionSupport

java.lang.Object
org.opensaml.saml.saml2.profile.SAML2ActionSupport

public final class SAML2ActionSupport extends Object
Helper methods for SAML 2 IdP actions.

## Field Summary

Fields
Modifier and Type
Field
Description
`private static final org.slf4j.Logger`
`LOG`
Logger.

## Constructor Summary

Constructors
Modifier
Constructor
Description
`private`
`SAML2ActionSupport()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`static Advice`
`addAdviceToAssertion(AbstractProfileAction action, Assertion assertion)`
Creates and adds a `Advice` to a given `Assertion`.
`static Assertion`
`addAssertionToResponse(AbstractProfileAction action, Response response, IdentifierGenerationStrategy idGenerator, String issuer)`
Constructs and adds a `Assertion` to the given `Response`.
`static Conditions`
`addConditionsToAssertion(AbstractProfileAction action, Assertion assertion)`
Creates and adds a `Conditions` to a given `Assertion`.
`static Assertion`
`buildAssertion(AbstractProfileAction action, IdentifierGenerationStrategy idGenerator, String issuer)`
Constructs an `Assertion` using the parameters supplied, with its issue instant set to the current time.

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

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

## Field Details

### LOG

@Nonnull private static final org.slf4j.Logger LOG
Logger.

## Constructor Details

### SAML2ActionSupport

private SAML2ActionSupport()
Constructor.

## Method Details

### buildAssertion

@Nonnull public static Assertion buildAssertion(@Nonnull AbstractProfileAction action, @Nonnull IdentifierGenerationStrategy idGenerator, @Nullable String issuer)
Constructs an `Assertion` using the parameters supplied, with its issue instant set to the current time.

Parameters:
  `action` - the current action
  `idGenerator` - source of assertion ID
  `issuer` - value for assertion
Returns:
  the assertion

### addAssertionToResponse

@Nonnull public static Assertion addAssertionToResponse(@Nonnull AbstractProfileAction action, @Nonnull Response response, @Nonnull IdentifierGenerationStrategy idGenerator, @Nullable String issuer)
Constructs and adds a `Assertion` to the given `Response`. The `Assertion` is constructed using the parameters supplied, and its issue instant is set to the issue instant of the given `Response`.

Parameters:
  `action` - the current action
  `response` - the response to which the assertion will be added
  `idGenerator` - source of assertion ID
  `issuer` - value for assertion
Returns:
  the assertion that was added to the response

### addConditionsToAssertion

@Nonnull public static Conditions addConditionsToAssertion(@Nonnull AbstractProfileAction action, @Nonnull Assertion assertion)
Creates and adds a `Conditions` to a given `Assertion`. If the `Assertion` already contains an `Conditions` this method just returns.

Parameters:
  `action` - current action
  `assertion` - assertion to which the condition will be added
Returns:
  the `Conditions` that already existed on, or the one that was added to, the `Assertion`

### addAdviceToAssertion

@Nonnull public static Advice addAdviceToAssertion(@Nonnull AbstractProfileAction action, @Nonnull Assertion assertion)
Creates and adds a `Advice` to a given `Assertion`. If the `Assertion` already contains an `Advice` this method just returns.

Parameters:
  `action` - current action
  `assertion` - assertion to which the advice will be added
Returns:
  the `Advice` that already existed on, or the one that was added to, the `Assertion`