ClientData
Less than 1 minute
ClientData
class ClientDataConstants
string
public const string = nullstring
public const string = nullProperties
raw
public readonly string $rawType: string
type
public readonly string $typeType: string
challenge
public readonly string $challengeType: string
origin
public readonly string $originType: string
crossOrigin
public readonly bool $crossOriginType: bool
topOrigin
public readonly string $topOriginType: string
Methods
__construct
private __construct(string $raw, string $type, string $challenge, string $origin, bool $crossOrigin, string $topOrigin): voidParameters
| Parameter | Type | Description |
|---|---|---|
$raw | string | |
$type | string | |
$challenge | string | |
$origin | string | |
$crossOrigin | bool | |
$topOrigin | string |
parse
public parse(string $raw): selfReturns: self
Parameters
| Parameter | Type | Description |
|---|---|---|
$raw | string | the clientDataJSON bytes |
verify
Checks the ceremony type, challenge and origins.
public verify(string $type, string $challenge, array $origins, bool $allowCrossOrigin, array $topOrigins): voidReturns: void
Parameters
| Parameter | Type | Description |
|---|---|---|
$type | string | the expected type, Hazaar\Auth\WebAuthn\CREATE or Hazaar\Auth\WebAuthn\GET |
$challenge | string | the challenge the relying party issued (raw bytes) |
$origins | array | the origins the relying party accepts, compared exactly |
$allowCrossOrigin | bool | whether to accept ceremonies run in a cross-origin iframe |
$topOrigins | array | the top-level origins accepted when it is cross-origin |
hash
SHA-256 of the raw client data, which is what the authenticator signs.
public hash(): stringReturns: string
Generated by Hazaar API Doc Generator on Wed, 28 Oct 2026 08:43:30 +0000