Class Action


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

      • sharedState

        public final JsonValue sharedState
        The output state of the node.
      • transientState

        public final JsonValue transientState
        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.
      • identifiedIdentity

        public final Optional<org.forgerock.openam.auth.node.api.IdentifiedIdentity> identifiedIdentity
        Optionally the identity confirmed to exist as part of this action.
    • Method Detail

      • 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.