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

PropertyReturnsDescription
adminOrgLongThe organisation the login-as session was initiated from.
createdAtDateWhen this nonce was created.
deviceStringA description of the device or user agent that created this nonce.
hostNameStringThe host name the request that created this nonce was made against.
loginAsbooleanWhether this nonce represents a login-as (impersonation) session.
nonceStringThe nonce string that identifies this login session.
profileLongThe profile being authenticated - for a login-as session this is the impersonated participant.
readOnlybooleanWhether write and ACL privileges should be stripped for this session.
reasonStringThe reason given for starting a login-as session, if one was recorded.
restrictionsSet<LoginAsRestriction>The login-as restrictions that apply to this session, parsed from the nonce's stored restriction codes.
sourceIpStringThe source IP address the request that created this nonce came from.
sourceLocationStringA resolved geographic location for the source IP address, where available.
sourceProfileLongFor 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.

ParameterDescription
restrictionthe restriction to check for
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.