AuthPayload
in package
FinalYes
Login payload from the Api (`data.payload` of login, OAuth and refresh), read by the admin and front presenters ({@see \App\Core\Traits\Admin\Presenters\AuthStorageTrait}, {@see \App\Core\Traits\Front\Presenters\AuthStorageTrait}).
Table of Contents
Methods
- fromMixed() : array<string, mixed>|null
- Returns the array with string keys only, or null.
- userId() : int|string|null
- Returns the user id (`userId`, older shape `id`); null when the payload has no usable id.
Methods
fromMixed()
Returns the array with string keys only, or null.
public
static fromMixed(mixed $payload) : array<string, mixed>|null
Parameters
- $payload : mixed
Return values
array<string, mixed>|nulluserId()
Returns the user id (`userId`, older shape `id`); null when the payload has no usable id.
public
static userId(array<string, mixed> $payload) : int|string|null
Parameters
- $payload : array<string, mixed>