Skip to content

Commit

Permalink
Update Token.php (#755)
Browse files Browse the repository at this point in the history
Follow up of #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 <ramon.nmgn@live.nl>
  • Loading branch information
ramonschriks committed Jan 9, 2024
1 parent 2dd8a74 commit 347bea6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Token.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,9 @@ public function validate(
} catch (InvalidTokenException $invalidTokenException) {
if ($tenantDomain !== $tokenIssuer) {
$validator->issuer($tenantDomain);
} else {
throw $invalidTokenException;
}

throw $invalidTokenException;
}

$validator
Expand Down

0 comments on commit 347bea6

Please # to comment.