Interface TreeState


public interface TreeState
An immutable container for the state associated with a partially or completely evaluated tree.
  • Method Details

    • toJson

      JsonValue toJson()
      Returns the JsonValue format of the TreeState object.
      Returns:
      JsonValue object of TreeState.
    • secureState

      JsonValue secureState()
      The secure state populated by transient state which is promoted to be retained across callback boundaries. Values are promoted to secure state from transient state under the condition that we are returning to the user with callbacks, and the key-data in transient state is marked as required by a node further down the tree. Data in secure state is encrypted, and stored within the shared state. As data may be promoted to secureState from transientState, secureState should not be accessed directly, but rather via the TreeContext.getState(String) method.
      Returns:
      The secure state.
    • unencryptedSecureState

      Optional<JsonValue> unencryptedSecureState()
      The optional unencrypted secure state. This should never be added to the tree result JSON.
      Returns:
      The unencrypted secure state.
    • sharedState

      JsonValue sharedState()
      The state populated by the nodes in the tree.
      Returns:
      The shared state.
    • transientState

      JsonValue transientState()
      The transient state populated by the nodes in the tree. The values stored in this state is request scoped would not be shared across multiple requests/callbacks in an authentication tree flow. Every time a callback is sent to the user the transient state would be reset to an empty json value object. As data may be promoted to secureState from transientState, transientState should not be accessed directly, but rather via the TreeContext.getState(String) method.
      Returns:
      The transient state.
    • currentNodeId

      UUID currentNodeId()
      The ID of the most recently processed node.
      Returns:
      The current node ID.
    • sessionProperties

      SessionProperties sessionProperties()
      Properties that will be included in the user's session if/when it is created.
      Returns:
      The session properties.
    • sessionHooks

      List<JsonValue> sessionHooks()
      List of classes that are run after successful authentication.
      Returns:
      The session hooks.
    • webhooks

      List<String> webhooks()
      List of webhooks that are run after session logout.
      Returns:
      The webhooks.
    • logoutHooks

      List<org.forgerock.openam.auth.logouthook.LogoutHookData> logoutHooks()
      List of logout hooks that are run synchronously after session logout.
      Returns:
      The logout hooks.
    • universalId

      Optional<String> universalId()
      The identity objects universal id.
      Returns:
      The universal id.
    • identifiedIdentity

      Optional<IdentifiedIdentity> identifiedIdentity()
      The identified user.
      Returns:
      The identified identity.
    • maxTreeDuration

      Optional<Duration> maxTreeDuration()
      The maximum duration of the tree.
      Returns:
      The max tree duration.