Skip to content

Commit 55d91a3

Browse files
revert fix deprecation
1 parent 133de8d commit 55d91a3

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/AuthorizationValidators/BearerTokenValidator.php

+3-10
Original file line numberDiff line numberDiff line change
@@ -74,20 +74,13 @@ private function initJwtConfiguration(): void
7474
throw new RuntimeException('Public key is empty');
7575
}
7676

77-
$validationConstraints = [
77+
$this->jwtConfiguration->setValidationConstraints(
7878
new LooseValidAt($clock, $this->jwtValidAtDateLeeway),
7979
new SignedWith(
8080
new Sha256(),
8181
InMemory::plainText($publicKeyContents, $this->publicKey->getPassPhrase() ?? '')
82-
),
83-
];
84-
85-
// TODO: next major release: bump lcobucci/jwt to ^5.5 and remove the following check
86-
if (method_exists($this->jwtConfiguration, 'withValidationConstraints') === true) {
87-
$this->jwtConfiguration = $this->jwtConfiguration->withValidationConstraints(...$validationConstraints);
88-
} else {
89-
$this->jwtConfiguration->setValidationConstraints(...$validationConstraints);
90-
}
82+
)
83+
);
9184
}
9285

9386
/**

0 commit comments

Comments
 (0)