Get Session Data node
The Get Session Data node retrieves the value of a specified key from a user’s session data,
and stores it in the specified key of the shared state (in scripts, the nodeState
object).
Use this node only during session upgrade—when the user has already successfully authenticated previously and is now upgrading their session for additional access. For more information on upgrading a session, refer to Session upgrade with MFA.
Compatibility
Product | Compatible? |
---|---|
Advanced Identity Cloud |
Yes |
PingAM (self-managed) |
Yes |
Ping Identity Platform (self-managed) |
Yes |
Dependencies
This node can complete its function only when the user has an existing session. Precede this node in the flow with a Scripted Decision node using a script to determine whether an existing session is present:
if (typeof existingSession !== 'undefined') {
outcome = "hasSession";
} else {
outcome = "noSession";
}
Configuration
All the configuration properties are required:
Property | Usage |
---|---|
Session Data Key |
Specify the session data key whose value the node reads. Default: none |
Shared State Key |
Specify the name of the shared node state field to hold the session data. Default: none |
Outputs
This node writes the Session Data Key value in the Shared State Key field of the shared node state.
It also writes the field and its value to the objectAttributes
object in the shared node state.
Outcomes
Single outcome path; on success, the Shared State Key in the shared node state holds the session data.
Errors
If it cannot read the Session Data Key value, this node logs
an Exception occurred trying to get data (<session-data-key>) from existing session
error message.
Example
When the user has an active session, the following example gets the username from the session, collects the password, and confirms the username-password credentials:
The following table includes example keys from an existing session with their corresponding sample values:
Key | Sample value |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|