diff --git a/CHANGELOG.md b/CHANGELOG.md index b157948..2ee2d13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to `laravel-webhook-client` will be documented in this file +## 2.0.1 - 2019-07-08 + +- make `signing_secret` and `signature_header_name` config keys optional + ## 2.0.0 - 2019-07-08 - `DefaultSignatureValidator` is now responsible for verifying that a signature header has been set diff --git a/src/WebhookConfig.php b/src/WebhookConfig.php index c2b7869..f6e2437 100644 --- a/src/WebhookConfig.php +++ b/src/WebhookConfig.php @@ -33,9 +33,9 @@ public function __construct(array $properties) { $this->name = $properties['name']; - $this->signingSecret = $properties['signing_secret']; + $this->signingSecret = $properties['signing_secret'] ?? ''; - $this->signatureHeaderName = $properties['signature_header_name']; + $this->signatureHeaderName = $properties['signature_header_name'] ?? ''; if (! is_subclass_of($properties['signature_validator'], SignatureValidator::class)) { throw InvalidConfig::invalidSignatureValidator($properties['signature_validator']);