-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
871c337
commit 58908c6
Showing
1 changed file
with
3 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,20 +74,13 @@ private function initJwtConfiguration(): void | |
throw new RuntimeException('Public key is empty'); | ||
} | ||
|
||
$validationConstraints = [ | ||
$this->jwtConfiguration->setValidationConstraints( | ||
Check failure on line 77 in src/AuthorizationValidators/BearerTokenValidator.php GitHub Actions / Static Analysis (8.2, prefer-stable, ubuntu-latest)
Check failure on line 77 in src/AuthorizationValidators/BearerTokenValidator.php GitHub Actions / Static Analysis (8.3, prefer-stable, ubuntu-latest)
Check failure on line 77 in src/AuthorizationValidators/BearerTokenValidator.php GitHub Actions / Static Analysis (8.4, prefer-stable, ubuntu-latest)
|
||
new LooseValidAt($clock, $this->jwtValidAtDateLeeway), | ||
new SignedWith( | ||
new Sha256(), | ||
InMemory::plainText($publicKeyContents, $this->publicKey->getPassPhrase() ?? '') | ||
), | ||
]; | ||
|
||
// TODO: next major release: bump lcobucci/jwt to ^5.5 and remove the following check | ||
if (method_exists($this->jwtConfiguration, 'withValidationConstraints') === true) { | ||
$this->jwtConfiguration = $this->jwtConfiguration->withValidationConstraints(...$validationConstraints); | ||
} else { | ||
$this->jwtConfiguration->setValidationConstraints(...$validationConstraints); | ||
} | ||
) | ||
); | ||
} | ||
|
||
/** | ||
|