From bc25e7bc0a3e943588e099cdd33e8b84dfdd6d7c Mon Sep 17 00:00:00 2001 From: Julien Nahum Date: Wed, 13 Jan 2021 17:26:02 +0000 Subject: [PATCH] Fix exception error message to use config value (#61) * Fix config publish typo * Throw exception on invalid/expired signature * Updated readme with exception changes * Updated readme with exception changes * Clean useless files * Make this a non breaking-change * Use config message for exception * Use config message for exception --- src/Exceptions/ExpiredSignatureException.php | 2 +- src/Exceptions/InvalidSignatureException.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Exceptions/ExpiredSignatureException.php b/src/Exceptions/ExpiredSignatureException.php index 6c50c3b..814a09b 100644 --- a/src/Exceptions/ExpiredSignatureException.php +++ b/src/Exceptions/ExpiredSignatureException.php @@ -9,6 +9,6 @@ class ExpiredSignatureException extends Exception { public function __construct() { - parent::__construct(401, 'Invalid signature.'); + parent::__construct(401, config('laravel-passwordless-login.invalid_signature_message')); } } diff --git a/src/Exceptions/InvalidSignatureException.php b/src/Exceptions/InvalidSignatureException.php index 1f378c2..ff45874 100644 --- a/src/Exceptions/InvalidSignatureException.php +++ b/src/Exceptions/InvalidSignatureException.php @@ -9,6 +9,6 @@ class InvalidSignatureException extends Exception { public function __construct() { - parent::__construct(401, 'Invalid signature.'); + parent::__construct(401, config('laravel-passwordless-login.invalid_signature_message')); } }