Below follow two examples of REST responses that return custom attributes in addition to the standard attributes.
Example 1: REST response of a successful Mandatory Password Change Step, with the Custom Response Attributes plugin configured with a User Statistics Map.
{
"meta": {
[...]
},
"data": {
"type": "authentication.session",
"id": "259918653401508592",
"attributes": {
"nextAuthStep": "MIGRATION_SELECTION_REQUIRED",
"customAttributes": {
"latest-successful-login": "<stamp>",
"latest-login-attemp": "<stamp>",
"failed-logins": 0,
"total-logins": 1,
"first-login": "<stamp>"
}
}
}
}
Example 2: REST response of a failed Mandatory Password Change Step, with a Custom Failure Response Attributes plugin configured with a User Statistics Map.
{
"meta": {
"type": "jsonapi.metadata.document",
"timestamp": "2025-03-03T09:54:40.948Z",
"temporaryLockExpiry": "2025-03-03T09:54:43.934Z",
"uiSettings": {
},
"customAttributes": {
"latest-successful-login": "2025-03-03T09:45:33.427Z",
"latest-login-attemp": "2025-03-03T09:47:19.199Z",
"failed-logins": 0,
"total-logins": 1,
"first-login": "2025-03-03T09:45:33.427Z"
},
"nextAuthStep": "PASSWORD_REQUIRED"
},
"errors": [
{
"id": "0948:4111",
"status": 400,
"code": "USERNAME_PASSWORD_WRONG"
}
]
}