workos-php icon indicating copy to clipboard operation
workos-php copied to clipboard

Add Actions helper class for WorkOS Actions support

Open blobaugh opened this issue 1 month ago • 0 comments

Description

Add Actions helper class for WorkOS Actions support

  • Add Actions.php service class with convenient wrapper methods for WebhookResponse and Webhook functionality
  • Add test suite
  • Include detailed docblocks with usage examples for all methods

New Methods:

  • allowUserRegistration() / denyUserRegistration() - User registration responses
  • allowAuthentication() / denyAuthentication() - Authentication responses
  • verifyWebhook() / parseWebhook() - Webhook handling
  • isUserRegistrationWebhook() / isAuthenticationWebhook() - Type checking
  • extractEmail() / extractUserId() / extractOrganizationId() - Data extraction

This makes WorkOS Actions support highly discoverable while maintaining consistency with existing SDK patterns. All methods delegate to existing WebhookResponse and Webhook classes without duplication.

Documentation

Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.

[ ] Yes

If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.

blobaugh avatar Oct 21 '25 20:10 blobaugh