SessionCreatedData
in package
implements
JsonSerializable
uses
JsonSerializableTrait
Read onlyYes
The event payload.
Table of Contents
Interfaces
- JsonSerializable
Properties
- $authMethod : UserSessionsAuthMethod
- The authentication method used to create this session.
- $createdAt : DateTimeImmutable
- An ISO 8601 timestamp.
- $endedAt : DateTimeImmutable|null
- The timestamp when the session ended.
- $expiresAt : DateTimeImmutable
- The timestamp when the session expires.
- $id : string
- The unique ID of the session.
- $impersonator : SessionCreatedDataImpersonator|null
- Information about the impersonator if this session was created via impersonation.
- $ipAddress : string|null
- The IP address from which the session was created.
- $object : string
- Distinguishes the session object.
- $organizationId : string|null
- The ID of the organization this session is associated with.
- $status : UserSessionsStatus
- The current status of the session.
- $updatedAt : DateTimeImmutable
- An ISO 8601 timestamp.
- $userAgent : string|null
- The user agent string from the device that created the session.
- $userId : string
- The ID of the user this session belongs to.
Methods
- __construct() : mixed
- fromArray() : self
- jsonSerialize() : array<string|int, mixed>
- toArray() : array<string|int, mixed>
Properties
$authMethod
The authentication method used to create this session.
public
UserSessionsAuthMethod
$authMethod
$createdAt
An ISO 8601 timestamp.
public
DateTimeImmutable
$createdAt
$endedAt
The timestamp when the session ended.
public
DateTimeImmutable|null
$endedAt
$expiresAt
The timestamp when the session expires.
public
DateTimeImmutable
$expiresAt
$id
The unique ID of the session.
public
string
$id
$impersonator
Information about the impersonator if this session was created via impersonation.
public
SessionCreatedDataImpersonator|null
$impersonator
= null
$ipAddress
The IP address from which the session was created.
public
string|null
$ipAddress
$object
Distinguishes the session object.
public
string
$object
$organizationId
The ID of the organization this session is associated with.
public
string|null
$organizationId
= null
$status
The current status of the session.
public
UserSessionsStatus
$status
$updatedAt
An ISO 8601 timestamp.
public
DateTimeImmutable
$updatedAt
$userAgent
The user agent string from the device that created the session.
public
string|null
$userAgent
$userId
The ID of the user this session belongs to.
public
string
$userId
Methods
__construct()
public
__construct(string $object, string $id, string|null $ipAddress, string|null $userAgent, string $userId, UserSessionsAuthMethod $authMethod, UserSessionsStatus $status, DateTimeImmutable $expiresAt, DateTimeImmutable|null $endedAt, DateTimeImmutable $createdAt, DateTimeImmutable $updatedAt[, SessionCreatedDataImpersonator|null $impersonator = null ][, string|null $organizationId = null ]) : mixed
Parameters
- $object : string
- $id : string
- $ipAddress : string|null
- $userAgent : string|null
- $userId : string
- $authMethod : UserSessionsAuthMethod
- $status : UserSessionsStatus
- $expiresAt : DateTimeImmutable
- $endedAt : DateTimeImmutable|null
- $createdAt : DateTimeImmutable
- $updatedAt : DateTimeImmutable
- $impersonator : SessionCreatedDataImpersonator|null = null
- $organizationId : string|null = null
fromArray()
public
static fromArray(array<string|int, mixed> $data) : self
Parameters
- $data : array<string|int, mixed>
Return values
selfjsonSerialize()
public
jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>toArray()
public
toArray() : array<string|int, mixed>