Groovy sample

// Only allow access for an identity with subject "user"
def subject = exc?.identity?.subject

if ("user".equals(subject)) {
} else {

Method summary

Method Description
String getSubject() Returns the subject of the identity.
String getMappedSubject() 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.
String getTrackingId() 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
String getTokenId() Returns the unique ID for the associated authentication token. This value might change when new tokens are issued for the same identity.
Date getTokenExpiration() 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.
JsonNode getAttributes() Returns a JsonNode object representing the attributes of the identity.