Set Success Details node
The Set Success Details node adds additional details to the JSON response on successful authentication. You can add details to the response body and set custom response headers.
- Response body
-
You can add either or both of the following to the JSON response:
-
Success details: Lets you add static
key:valuefields to the JSON response. -
Session properties: Lets you add
key:valuefields to the JSON response, wherevaluecorresponds to the value of the specified session property.This lets you retrieve session properties in the journey without needing additional post-authentication processing.
You can’t override the default
tokenId,successUrl, andrealmfields returned in the JSON response. -
- Response headers RAPID only
-
You can set custom headers to include in the JSON response.
You can’t modify the protected HTTP headers, nor can you modify the session cookie or load balancer cookie using the
Set-Cookieheader.Protected HTTP headers
-
X-Frame-Options -
X-Content-Type-Options -
Cache-Control -
Content-API-Version -
Expires -
Pragma -
Content-Type -
Content-Length -
Date -
Keep-Alive -
Connection -
Transfer-Encoding -
Server -
Trailer -
Upgrade
-
Examples
Example 1: Add static content and session properties
This example uses the Set Success Details node to add the following additional details to the JSON response:
-
A static
authMethod:passwordfield. -
A
universalIdsession property, which returns the corresponding value from the session when the user authenticates.
-
The Page node containing the Platform Username node and Platform Password node prompts for credentials.
-
The Data Store Decision node validates the username-password credentials.
-
The Increment Login Count node updates the number of successful authentications in the user profile.
-
The Set Success Details node adds the additional configured details to the JSON response upon successful authentication. This example uses the following configuration:
- Success Details
-
Key:
authMethodValue:
password - Session Properties
-
Key:
universalIdValue:
sun.am.UniversalIdentifier
When the user authenticates successfully using this journey, the JSON response includes the additional details you configured. For example:
{
"tokenId": "AQIC5wM…TU3OQ*",
"successUrl": "/enduser/?realm=/alpha",
"realm": "/alpha",
"universalId": "id=bjensen,ou=user,o=alpha,ou=services,ou=am-config",
"authMethod": "password"
}
Example 2: Add dynamic content
This example uses the Configuration Provider node to imitate the Set Success Details node. Using the Configuration Provider node lets you add dynamic content to the JSON response, such as an API response, in addition to static content and session properties.
Find more information in Example 2: Imitate the Set Success Details node.
Example 3: Set custom response headers
RAPID only
This example uses the Set Success Details node to set a Custom-Auth response header on successful authentication. This header could be read by a legacy API gateway or reverse proxy that uses Advanced Identity Cloud to handle the authentication logic.
-
The Page node containing the Platform Username node and Platform Password node prompts for credentials.
-
The Data Store Decision node validates the username-password credentials.
-
The Increment Login Count node updates the number of successful authentications in the user profile.
-
The Set Success Details node sets the response header upon successful authentication. This example uses the following configuration:
- Response Headers
-
Key:
Custom-AuthValue:
username-password
Follow these steps to try the example:
-
Create the example journey using the journey editor.
-
Authenticate a test user with the journey. Make sure you include the
--show-headersoption (or--includein oldercurlversions) to return the response headers:$ curl --show-headers \ --request POST \ --header 'X-OpenAM-Username: bjensen' \ --header 'X-OpenAM-Password: Ch4ng3it!' \ --header "Accept-API-Version: resource=2.1, protocol=1.0" \ "https://tenant-env-fqdn/am/json/realms/root/realms/alpha/authenticate?authIndexType=service&authIndexValue=myJourney" HTTP/1.1 200 X-Frame-Options: SAMEORIGIN X-Content-Type-Options: nosniff ... Custom-Auth: username-password ... { "tokenId": "AQIC5wM…TU3OQ*", "successUrl": "/enduser/?realm=/alpha", "realm": "/alpha" }
Availability
| Product | Available? |
|---|---|
PingOne Advanced Identity Cloud |
Yes |
PingAM (self-managed) |
Yes |
Ping Identity Platform (self-managed) |
Yes |
Dependencies
Make sure the user can successfully authenticate and get a session.
If this node is added to a no session journey or the noSession query parameter is used during authentication, the journey will fail.
Configuration
| Property | Usage | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Success Details |
The success details to add:
When finished, click Save to keep your settings. |
||||||||||||
Session Properties |
The session properties to add.
You can find a list of the default session properties in Configure webhooks.
When finished, click Save to keep your settings. |
||||||||||||
Response Headers RAPID only |
The response headers to set.
When finished, click Save to keep your settings. |