Skip to content

Commit a603133

Browse files
committed
Restrict lcobucci/jwt to the 4.0.x branch to ensure backward compat
1 parent cb17576 commit a603133

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"php": "^7.2 || ^8.0",
88
"ext-openssl": "*",
99
"league/event": "^2.2",
10-
"lcobucci/jwt": "^3.4 || ^4.1",
10+
"lcobucci/jwt": "^3.4 || ~4.0.0",
1111
"psr/http-message": "^1.0.1",
1212
"defuse/php-encryption": "^2.2.1",
1313
"ext-json": "*"

src/AuthorizationValidators/BearerTokenValidator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use Lcobucci\JWT\Signer\Key\LocalFileReference;
1717
use Lcobucci\JWT\Signer\Rsa\Sha256;
1818
use Lcobucci\JWT\Validation\Constraint\SignedWith;
19-
use Lcobucci\JWT\Validation\Constraint\StrictValidAt;
19+
use Lcobucci\JWT\Validation\Constraint\ValidAt;
2020
use Lcobucci\JWT\Validation\RequiredConstraintsViolated;
2121
use League\OAuth2\Server\CryptKey;
2222
use League\OAuth2\Server\CryptTrait;
@@ -74,7 +74,7 @@ private function initJwtConfiguration()
7474
);
7575

7676
$this->jwtConfiguration->setValidationConstraints(
77-
new StrictValidAt(new SystemClock(new DateTimeZone(\date_default_timezone_get()))),
77+
new ValidAt(new SystemClock(new DateTimeZone(\date_default_timezone_get()))),
7878
new SignedWith(new Sha256(), LocalFileReference::file($this->publicKey->getKeyPath()))
7979
);
8080
}

0 commit comments

Comments
 (0)