From 2fb369710abc984e72d2cd5cc998746ec5a66a26 Mon Sep 17 00:00:00 2001 From: freek Date: Mon, 8 Jul 2019 21:21:28 +0200 Subject: [PATCH] wip --- CHANGELOG.md | 4 ++++ src/WebhookConfig.php | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) 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']);