WorkOS PHP SDK

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'

Properties

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
self

toArray()

public toArray() : array<string, mixed>
Return values
array<string, mixed>

        
On this page

Search results