Class Action

java.lang.Object
org.forgerock.openam.auth.node.api.Action

@SupportedAll public final class Action extends Object
Immutable container for the result of processing a node.
  • Field Details

    • DESCRIPTION

      public static final String DESCRIPTION
      Key for the description return property.
      See Also:
    • STAGE

      public static final String STAGE
      Key for the stage return property.
      See Also:
    • sharedState

      @Deprecated(since="8.0.0") public final JsonValue sharedState
      Deprecated.
      use NodeState instead, setting state in the action is no longer required.
      The output state of the node.
    • transientState

      @Deprecated(since="8.0.0") public final JsonValue transientState
      Deprecated.
      use NodeState instead, setting state in the action is no longer required.
      The transient state of the node.
    • outcome

      public final String outcome
      Result of the node. May be null.
    • returnProperties

      public final Map<String,Object> returnProperties
      Properties to return to the client.
    • errorMessage

      public final String errorMessage
      The error message to present to the caller when the FAILURE node is reached.
    • lockoutMessage

      public final String lockoutMessage
      The error message to present to the caller when the user is locked out.
    • callbacks

      public final List<Callback> callbacks
      Callbacks requested by the node when the outcome is null. May be null.
    • sessionProperties

      public final Map<String,String> sessionProperties
      Properties that will be included in the user's session if/when it is created.
    • sessionHooks

      public final List<JsonValue> sessionHooks
      List of classes implementing TreeHook that run after successful login.
    • webhooks

      public final List<String> webhooks
      List of webhooks that run after logout.
    • suspensionHandler

      public final SuspensionHandler suspensionHandler
      The SuspensionHandler to call when the authentication process is suspended by the authentication framework.
    • universalId

      @Deprecated public final Optional<String> universalId
      Deprecated.
      use identifiedIdentity instead.
      The universal id of the identity object.
    • identifiedIdentity

      public final Optional<IdentifiedIdentity> identifiedIdentity
      Optionally the identity confirmed to exist as part of this action.
  • Method Details

    • goTo

      public static Action.ActionBuilder goTo(String outcome)
      Move on to the next node in the tree that is connected to the given outcome.
      Parameters:
      outcome - the outcome.
      Returns:
      an action builder to provide additional details.
    • send

      public static Action.ActionBuilder send(List<? extends Callback> callbacks)
      Send the given callbacks to the user for them to interact with.
      Parameters:
      callbacks - a non-empty list of callbacks.
      Returns:
      an action builder to provide additional details.
    • send

      public static Action.ActionBuilder send(Callback... callbacks)
      Send the given callbacks to the user for them to interact with.
      Parameters:
      callbacks - a non-empty list of callbacks.
      Returns:
      an action builder to provide additional details.
    • suspend

      public static Action.ActionBuilder suspend(SuspensionHandler suspensionHandler)
      Suspend the current authentication request, and allow the end-user to resume it later by clicking on a link for example.
      Parameters:
      suspensionHandler - The SuspensionHandler to use for sending the suspension ID to the end-users.
      Returns:
      An action builder that suspends the current authentication flow.
    • sendingCallbacks

      public boolean sendingCallbacks()
      Returns true if the action is a request for input.
      Returns:
      true if the action need to request for input, false otherwise.
    • hasSuspensionHandler

      public boolean hasSuspensionHandler()
      Returns true if the suspension handler is set.
      Returns:
      true if the action is a request to suspend the authentication flow.