Download the PHP package cline/webhook without Composer
On this page you can find all versions of the php package cline/webhook. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cline/webhook
More information about cline/webhook
Files in cline/webhook
Informations about the package webhook
Laravel Webhook Package
Standard-compliant Laravel webhook client and server with HMAC-SHA256 and Ed25519 signature support.
Features
Standard Webhooks Compliance
- Fully compliant with Standard Webhooks specification
- Required headers:
webhook-id,webhook-timestamp,webhook-signature - Signature formats:
v1,<base64>(HMAC) andv1a,<base64>(Ed25519) - Timestamp validation for replay attack prevention
- webhook-id as idempotency key
Server Features (Sending Webhooks)
- Fluent API for webhook dispatch
- Async dispatch via Laravel queues (default) + sync option
- Conditional dispatch:
dispatchIf(),dispatchUnless() - HMAC-SHA256 and Ed25519 signature generation
- Automatic retry with exponential backoff
- SSL verification with mutual TLS support
- Events: DispatchingWebhookCallEvent, WebhookCallSucceededEvent, WebhookCallFailedEvent, FinalWebhookCallFailedEvent
- Custom headers, proxy support, raw body transmission
- Metadata attachment, tagging for Laravel Horizon
Client Features (Receiving Webhooks)
- Route macro:
Route::webhooks()with CSRF bypass - Signature verification (both HMAC and Ed25519)
- Request validation and filtering via WebhookProfile
- Database storage in
webhook_callstable - Async processing via ProcessWebhookJob
- Configurable response handlers
- Selective header storage
- Automatic pruning with MassPrunable trait
- Multi-tenant support (multiple webhook endpoints)
Requirements
Requires PHP 8.3+
Installation
Publish the configuration file:
Run the migrations:
Usage
Server Side (Sending Webhooks)
Basic Usage
Advanced Usage
Conditional Dispatch
Synchronous Dispatch
Ed25519 Signatures
Client Side (Receiving Webhooks)
Setup Routes
In your routes/web.php or routes/api.php:
This creates POST routes that:
- Bypass CSRF verification
- Automatically verify signatures
- Store webhook in database
- Queue processing job
Configure Webhook Endpoints
In config/webhook.php:
Process Webhooks
Create a custom processor by implementing the ProcessesWebhook interface:
Register in config:
Custom Webhook Profiles (Filtering)
Listen to Events
Query Webhooks
Automatic Pruning
Add to app/Console/Kernel.php:
Configuration
Server Configuration
Client Configuration
Testing
The package includes comprehensive tests for both HMAC and Ed25519 flows:
Security
This package implements Standard Webhooks security best practices:
- Signature Verification: All webhooks are signed with HMAC-SHA256 or Ed25519
- Timestamp Validation: Prevents replay attacks with configurable tolerance window
- Idempotency: Uses webhook-id to prevent duplicate processing
- SSL/TLS: Enforces secure connections by default
- Constant-Time Comparison: Uses
hash_equals()for signature verification
Change log
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please use the GitHub security reporting form rather than the issue queue.
Credits
- Brian Faust
- All Contributors
License
The MIT License. Please see License File for more information.
All versions of webhook with dependencies
cline/variable-keys Version ^2.0.1
facade/ignition-contracts Version ^1.0.2
guzzlehttp/guzzle Version ^7.10
laravel/framework Version ^10.0 || ^11.0 || ^12.0 || ^13.0
paragonie/sodium_compat Version ^2.5
spatie/laravel-package-tools Version ^1.93.0