From 347bea687eec0e34c1e5a4357b3e26c13cd7bc8b Mon Sep 17 00:00:00 2001 From: ramonschriks Date: Tue, 9 Jan 2024 18:32:42 +0100 Subject: [PATCH] Update Token.php (#755) Follow up of https://github.com/auth0/auth0-PHP/pull/753 --- What a failure.. After validating the issuer with the tenant domain, we still throw'd the exception... It must not fall through this validation succeeds. Perhaps a unit test is required for this. Signed-off-by: ramonschriks --- src/Token.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Token.php b/src/Token.php index 7ed7101f..f4a91895 100644 --- a/src/Token.php +++ b/src/Token.php @@ -281,9 +281,9 @@ public function validate( } catch (InvalidTokenException $invalidTokenException) { if ($tenantDomain !== $tokenIssuer) { $validator->issuer($tenantDomain); + } else { + throw $invalidTokenException; } - - throw $invalidTokenException; } $validator