From 92ca18afbaffe2bbf286208b22dbc4b6c13a9d07 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Fri, 31 May 2024 09:08:00 +0200 Subject: [PATCH] Able to retrieve the hash from the validator --- src/Handlers/HMAC/Validator.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Handlers/HMAC/Validator.php b/src/Handlers/HMAC/Validator.php index 92560cbe..b3efd00b 100644 --- a/src/Handlers/HMAC/Validator.php +++ b/src/Handlers/HMAC/Validator.php @@ -49,7 +49,7 @@ class Validator extends Hmac /** * @var string */ - protected string $hash; + protected string $hash = ''; /** * @param Config $config @@ -102,4 +102,12 @@ public function validateOrFail(string $header, string $uri, string $method, $dat throw new BuckarooException($this->config->getLogger(), "HMAC validation failed."); } + + /** + * @return string + */ + public function getHash(): string + { + return $this->hash; + } }