Skip to content

Commit

Permalink
Renamed variable
Browse files Browse the repository at this point in the history
  • Loading branch information
corbadoman committed Sep 29, 2024
1 parent ce7b303 commit 4e1563d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Services/SessionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,22 +115,22 @@ public function validateToken(string $shortSession): UserEntity
/**
* @throws ValidationException
*/
private function validateIssuer(string $issuer, string $shortSession): void
private function validateIssuer(string $jwtIssuer, string $shortSession): void
{
// Compare to old Frontend API (without .cloud.) to make our Frontend API host name change downwards compatible
if ($issuer === sprintf('https://%s.frontendapi.corbado.io', $this->projectID)) {
if ($jwtIssuer === sprintf('https://%s.frontendapi.corbado.io', $this->projectID)) {
return;
}

// Compare to new Frontend API (with .cloud.)
if ($issuer === sprintf('https://%s.frontendapi.cloud.corbado.io', $this->projectID)) {
if ($jwtIssuer === sprintf('https://%s.frontendapi.cloud.corbado.io', $this->projectID)) {
return;
}

// Compare to configured issuer (from FrontendAPI), needed if you set a CNAME for example
if ($issuer !== $this->issuer) {
if ($jwtIssuer !== $this->issuer) {
throw $this->createValidationException(
sprintf('Mismatch in issuer (configured through FrontendAPI: "%s", JWT issuer: "%s")', $this->issuer, $issuer),
sprintf('Mismatch in issuer (configured through FrontendAPI: "%s", JWT issuer: "%s")', $this->issuer, $jwtIssuer),
$shortSession,
ValidationException::CODE_JWT_ISSUER_MISMATCH
);
Expand Down

0 comments on commit 4e1563d

Please sign in to comment.