Result
Less than 1 minute
Result
Properties
success
public bool $successidentity
public string $identitymessage
public string $messagedata
public array $dataMethods
__construct
public __construct(bool $success, ?string $identity, array $data): voidParameters
| Parameter | Type | Description |
|---|---|---|
$success | bool | Whether authentication was successful |
$identity | string | The authenticated identity (e.g., user ID), or null if authentication failed |
$data | array | Additional data associated with the authentication result |
success
Creates a successful authentication result.
public success(string $identity, array $data): selfParameters
| Parameter | Type | Description |
|---|---|---|
$identity | string | the authenticated user's identity |
$data | array |
failure
Creates a failed authentication result with the provided error message.
public failure(string $message): selfParameters
| Parameter | Type | Description |
|---|---|---|
$message | string | the failure message to associate with the result |
jsonSerialize
Specifies data which should be serialized to JSON.
public jsonSerialize(): voidGenerated by Hazaar API Doc Generator on Sun, 01 Mar 2026 09:22:26 +0000