Immutable, request-safe snapshot of a LoginNonce. Built once per nonce (cached) and stashed on the current request so that privilege evaluation, the login-as banner, auditing and future features can cheaply tell whether the current session is a login-as session, who initiated it, and what restrictions apply, without re-loading the entity.
Properties
| Property | Returns | Description |
|---|---|---|
| adminOrg | Long | The organisation the login-as session was initiated from. |
| createdAt | Date | When this nonce was created. |
| device | String | A description of the device or user agent that created this nonce. |
| hostName | String | The host name the request that created this nonce was made against. |
| loginAs | boolean | Whether this nonce represents a login-as (impersonation) session. |
| nonce | String | The nonce string that identifies this login session. |
| profile | Long | The profile being authenticated - for a login-as session this is the impersonated participant. |
| readOnly | boolean | Whether write and ACL privileges should be stripped for this session. |
| reason | String | The reason given for starting a login-as session, if one was recorded. |
| restrictions | Set<LoginAsRestriction> | The login-as restrictions that apply to this session, parsed from the nonce's stored restriction codes. |
| sourceIp | String | The source IP address the request that created this nonce came from. |
| sourceLocation | String | A resolved geographic location for the source IP address, where available. |
| sourceProfile | Long | For a login-as session, the profile that initiated the login-as (the manager/admin). Null for normal logins. |
Methods
getNonce() · getProfile() · getSourceProfile() · getReason() · getCreatedAt() · getAdminOrg() · getHostName() · getDevice() · getSourceIp() · getSourceLocation() · getRestrictions() · isLoginAs() · isReadOnly() · has(LoginAsRestriction restriction)
getNonce()
Returns: String
The nonce string that identifies this login session.
getProfile()
Returns: Long
The profile being authenticated - for a login-as session this is the impersonated participant.
getSourceProfile()
Returns: Long
For a login-as session, the profile that initiated the login-as (the manager/admin). Null for normal logins.
getReason()
Returns: String
The reason given for starting a login-as session, if one was recorded.
getCreatedAt()
Returns: Date
When this nonce was created.
getAdminOrg()
Returns: Long
The organisation the login-as session was initiated from.
getHostName()
Returns: String
The host name the request that created this nonce was made against.
getDevice()
Returns: String
A description of the device or user agent that created this nonce.
getSourceIp()
Returns: String
The source IP address the request that created this nonce came from.
getSourceLocation()
Returns: String
A resolved geographic location for the source IP address, where available.
getRestrictions()
Returns: Set<LoginAsRestriction>
The login-as restrictions that apply to this session, parsed from the nonce's stored restriction codes.
isLoginAs()
Returns: boolean
Whether this nonce represents a login-as (impersonation) session.
isReadOnly()
Returns: boolean
Whether write and ACL privileges should be stripped for this session.
has(LoginAsRestriction restriction)
Returns: boolean
Checks whether a specific login-as restriction applies to this session.
| Parameter | Description |
|---|---|
restriction | the restriction to check for |