Identity object reference
The Identity object contains information about the authenticated identity associated with the current HTTP request.
Groovy sample
// Only allow access for an identity with subject "user" def subject = exc?.identity?.subject if ("user".equals(subject)) { pass() } else { fail() }
Method summary
Method | Description |
---|---|
|
Returns the subject of the identity. |
|
Returns the subject set by the identity mapping. If there is no identity mapping associated with the application, the return value will be null. If there is an identity mapping associated with the application, but the identity mapping did not determine a subject to map, the returned value might be the empty string. |
|
Returns the tracking identifier used in PingAccess logs. This value is not guaranteed to be globally unique and should be used for diagnostic purposes only. |
|
Returns the unique ID for the associated authentication token. This value might change when new tokens are issued for the same identity. |
|
Returns a Date object representing the time at which the authentication token expires. This might be null if the authentication provider did not indicate an expiry. |
|
Returns a JsonNode object representing the attributes of the identity. |