We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae42a6a commit 5ecee6bCopy full SHA for 5ecee6b
src/Client.php
@@ -157,11 +157,13 @@ public function verify(string $token): string
157
}
158
159
// Validate the token claims.
160
+ $clock = \Lcobucci\Clock\SystemClock::fromUTC();
161
+ $leeway = new \DateInterval('PT' . $this->leeway . 'S');
162
$constraints = [
163
new JwtConstraint\SignedWith(new JwtSigner\Rsa\Sha256(), $publicKey),
164
new JwtConstraint\IssuedBy($this->broker),
165
new JwtConstraint\PermittedFor($this->clientId),
- new JwtConstraint\LooseValidAt(\Lcobucci\Clock\SystemClock::fromUTC()),
166
+ new JwtConstraint\LooseValidAt($clock, $leeway),
167
];
168
$jwt->validator()->assert($token, ...$constraints);
169
0 commit comments