From c41a1ad727e3d3ce4efd3544d92439f5c716681d Mon Sep 17 00:00:00 2001 From: Nikita Date: Mon, 11 Mar 2024 02:27:38 +0500 Subject: [PATCH] fix --- src/AmoCRM/OAuth/AmoCRMOAuth.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/AmoCRM/OAuth/AmoCRMOAuth.php b/src/AmoCRM/OAuth/AmoCRMOAuth.php index ef8e605..2a60ff8 100755 --- a/src/AmoCRM/OAuth/AmoCRMOAuth.php +++ b/src/AmoCRM/OAuth/AmoCRMOAuth.php @@ -31,7 +31,7 @@ use Lcobucci\JWT\Validation\Constraint; use Lcobucci\JWT\Validation\Constraint\PermittedFor; use Lcobucci\JWT\Validation\Constraint\SignedWith; -use Lcobucci\JWT\Validation\Constraint\ValidAt; +use Lcobucci\JWT\Validation\Constraint\LooseValidAt; use Lcobucci\JWT\Validation\ConstraintViolation; use League\OAuth2\Client\Grant\AuthorizationCode; use League\OAuth2\Client\Grant\RefreshToken; @@ -472,7 +472,7 @@ public function parseDisposableToken(string $token): DisposableTokenModel // Проверим наш ли адресат new PermittedFor($clientBaseUri), // Проверка жизни токена - new Constraint\LooseValidAt(FrozenClock::fromUTC()), + new LooseValidAt(FrozenClock::fromUTC()), ]; $configuration = Configuration::forSymmetricSigner($signer, $key); @@ -489,7 +489,7 @@ public function parseDisposableToken(string $token): DisposableTokenModel throw DisposableTokenVerificationFailedException::create(); case $constraint instanceof PermittedFor: throw DisposableTokenInvalidDestinationException::create(); - case $constraint instanceof ValidAt: + case $constraint instanceof LooseValidAt: throw DisposableTokenExpiredException::create(); } } @@ -519,7 +519,7 @@ public function parseBotDisposableToken(string $token, string $receiverPath = nu // Проверка подписи new SignedWith($signer, $key), // Проверка жизни токена, с 4.2 deprecated use LooseValidAt - new ValidAt(FrozenClock::fromUTC()), + new LooseValidAt(FrozenClock::fromUTC()), ]; if ($receiverPath !== null) { @@ -542,7 +542,7 @@ public function parseBotDisposableToken(string $token, string $receiverPath = nu throw DisposableTokenVerificationFailedException::create(); case $constraint instanceof PermittedFor: throw DisposableTokenInvalidDestinationException::create(); - case $constraint instanceof ValidAt: + case $constraint instanceof LooseValidAt: throw DisposableTokenExpiredException::create(); } }