WebhookResponse
in package
Response structure for WorkOS webhook action verdicts.
Table of Contents
Constants
- AUTHENTICATION_ACTION = 'authentication_action_response'
- USER_REGISTRATION_ACTION = 'user_registration_action_response'
- VERDICT_ALLOW = 'Allow'
- VERDICT_DENY = 'Deny'
Properties
- $object : string
- $payload : array<string, mixed>
- $signature : string
Methods
- create() : self
- Create a new WebhookResponse instance.
- toArray() : array<string, mixed>
- toJson() : string
Constants
AUTHENTICATION_ACTION
public
mixed
AUTHENTICATION_ACTION
= 'authentication_action_response'
USER_REGISTRATION_ACTION
public
mixed
USER_REGISTRATION_ACTION
= 'user_registration_action_response'
VERDICT_ALLOW
public
mixed
VERDICT_ALLOW
= 'Allow'
VERDICT_DENY
public
mixed
VERDICT_DENY
= 'Deny'
Properties
$object
private
string
$object
$payload
private
array<string, mixed>
$payload
$signature
private
string
$signature
Methods
create()
Create a new WebhookResponse instance.
public
static create(string $type, string $secret, string $verdict[, string|null $errorMessage = null ]) : self
Parameters
- $type : string
-
Either USER_REGISTRATION_ACTION or AUTHENTICATION_ACTION
- $secret : string
-
Webhook secret for signing
- $verdict : string
-
Either VERDICT_ALLOW or VERDICT_DENY
- $errorMessage : string|null = null
-
Required when verdict is VERDICT_DENY
Return values
selftoArray()
public
toArray() : array<string, mixed>
Return values
array<string, mixed>toJson()
public
toJson() : string