Package org.forgerock.am.trees.model
Interface TreeState
public interface TreeState
An immutable container for the state associated with a partially or completely evaluated tree.
-
Method Summary
Modifier and TypeMethodDescriptionThe ID of the most recently processed node.The identified user.List<org.forgerock.openam.auth.logouthook.LogoutHookData>List of logout hooks that are run synchronously after session logout.The maximum duration of the tree.The secure state populated by transient state which is promoted to be retained across callback boundaries.List of classes that are run after successful authentication.Properties that will be included in the user's session if/when it is created.The state populated by the nodes in the tree.toJson()Returns the JsonValue format of the TreeState object.The transient state populated by the nodes in the tree.The optional unencrypted secure state.The identity objects universal id.webhooks()List of webhooks that are run after session logout.
-
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 theTreeContext.getState(String)method.- Returns:
- The secure state.
-
unencryptedSecureState
The optional unencrypted secure state. This should never be added to the tree result JSON.- Returns:
- The unencrypted secure 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 theTreeContext.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 of classes that are run after successful authentication.- Returns:
- The session hooks.
-
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
The identity objects universal id.- Returns:
- The universal id.
-
identifiedIdentity
Optional<IdentifiedIdentity> identifiedIdentity()The identified user.- Returns:
- The identified identity.
-
maxTreeDuration
The maximum duration of the tree.- Returns:
- The max tree duration.
-