Skip to content

Commit 7d2bd74

Browse files
committed
Updated README
1 parent df5fe93 commit 7d2bd74

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,23 @@ WebhookCall::create()
292292
...
293293
```
294294

295+
### Using mutual TLS authentication
296+
297+
To safeguard the integrity of webhook data transmission, it's critical to authenticate the intended recipient of your webhook payload.
298+
Mutual TLS authentication serves as a robust method for this purpose. Contrary to standard TLS, where only the client verifies the server,
299+
mutual TLS requires both the webhook endpoint (acting as the client) and the webhook provider (acting as the server) to authenticate each other.
300+
This is achieved through an exchange of certificates during the TLS handshake, ensuring that both parties confirm each other's identity.
301+
302+
```php
303+
WebhookCall::create()
304+
->mutualTls(
305+
certPath: storage_path('path/to/cert.pem'),
306+
certPassphrase: 'optional_cert_passphrase',
307+
sslKeyPath: storage_path('path/to/key.pem'),
308+
sslKeyPassphrase: 'optional_key_passphrase'
309+
)
310+
```
311+
295312
The proxy specification follows the [guzzlehttp proxy format](https://docs.guzzlephp.org/en/stable/request-options.html#proxy)
296313

297314
### Verifying the SSL certificate of the receiving app

0 commit comments

Comments
 (0)