AXIAM PHP SDK

SessionResponse
in package
implements JsonSerializable

FinalYes

One of a user's sessions, as an administrator sees it.

Table of Contents

Interfaces

JsonSerializable

Properties

$amr  : array<string|int, mixed>
$authenticatedAt  : string
$createdAt  : string
$expiresAt  : string
$id  : string
$ipAddress  : string|null
$refreshReplayAt  : string|null
$refreshReplayGraceAccepted  : int
$refreshReplayRefused  : int
$refreshReplayVerdict  : string
$userAgent  : string|null

Methods

__construct()  : mixed
Constructs a SessionResponse.
fromArray()  : self
Rebuilds a SessionResponse from one decoded JSON object.
jsonSerialize()  : array<string, mixed>
Renders this object for `json_encode()`.
toArray()  : array<string, mixed>
Renders this object back to its wire form.

Properties

$refreshReplayAt read-only

public string|null $refreshReplayAt = null

$refreshReplayGraceAccepted read-only

public int $refreshReplayGraceAccepted

Methods

__construct()

Constructs a SessionResponse.

public __construct(array<int, string> $amr, string $authenticatedAt, string $createdAt, string $expiresAt, string $id, int $refreshReplayGraceAccepted, int $refreshReplayRefused, string $refreshReplayVerdict[, string|null $ipAddress = null ][, string|null $refreshReplayAt = null ][, string|null $userAgent = null ]) : mixed
Parameters
$amr : array<int, string>

RFC 8176 method references for that authentication.

$authenticatedAt : string

X7.2 — when the end user actually authenticated, which is not created_at on a session produced by refresh rotation.

$createdAt : string

the server's created_at field

$expiresAt : string

the server's expires_at field

$id : string

the server's id field

$refreshReplayGraceAccepted : int

T-254 — replays accepted under the FAPI 2.0 §5.3.2.1-9 grace window. Only ever non-zero for a client registered profile: fapi2.

$refreshReplayRefused : int

T-254 — replays refused because there was no window to accept them in. Nothing a conformant client does.

$refreshReplayVerdict : string

T-254 — the badge: none, fapi_grace_retry or refused. Derived from the two counters below rather than stored, so it cannot disagree with them. A refusal outranks an accepted grace retry however the counts compare.

$ipAddress : string|null = null

the server's ip_address field (optional)

$refreshReplayAt : string|null = null

T-254 — when a refresh token of this session was last presented after it had already been rotated. None if that has never happened. (optional)

$userAgent : string|null = null

the server's user_agent field (optional)

fromArray()

Rebuilds a SessionResponse from one decoded JSON object.

public static fromArray(array<string, mixed> $data) : self
Parameters
$data : array<string, mixed>

The raw wire object.

Return values
self

jsonSerialize()

Renders this object for `json_encode()`.

public jsonSerialize() : array<string, mixed>

Any Sensitive it carries stays WRAPPED here, so a log line or a json_encode($model) in application code prints [SENSITIVE]. The one place a secret is revealed is ManagementTransport, on the way to the wire and nowhere else (§27.5).

Return values
array<string, mixed>

toArray()

Renders this object back to its wire form.

public toArray() : array<string, mixed>

§27.4 rule 5: a null property is OMITTED, not emitted as null. On a sparse update those two say opposite things — "leave this alone" versus "set this to nothing" — and only omission means the first.

Return values
array<string, mixed>
On this page

Search results