Skip to content

Commit 315e517

Browse files
committed
add 5 second leeway
1 parent 87ece6b commit 315e517

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Utils/DPop.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ private function validateDpop($dpop, $request) {
162162

163163
//error_log("8");
164164
// 8. the token was issued within an acceptable timeframe (see Section 9.1), and
165-
$validationData = new ValidationData(); // It will use the current time to validate (iat, nbf and exp)
165+
$leeway = 5; // allow 5 seconds clock skew
166+
$validationData = new ValidationData(time() + $leeway); // It will use the current time to validate (iat, nbf and exp)
166167
if (!$dpop->validate($validationData)) {
167168
throw new \Exception("token timing is invalid");
168169
}

0 commit comments

Comments
 (0)