Skip to content

Commit

Permalink
ensures leeway is at least 1, instead of setting it to 1 (#1455)
Browse files Browse the repository at this point in the history
  • Loading branch information
bshaffer authored and JustinBeckwith committed Jun 13, 2018
1 parent de3bd7a commit a68d080
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Google/AccessToken/Verify.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ private function getJwtService()
$jwtClass = 'Firebase\JWT\JWT';
}

if (property_exists($jwtClass, 'leeway')) {
// adds 1 second to JWT leeway
if (property_exists($jwtClass, 'leeway') && $jwtClass::$leeway < 1) {
// Ensures JWT leeway is at least 1
// @see https://github.com/google/google-api-php-client/issues/827
$jwtClass::$leeway = 1;
}
Expand Down

0 comments on commit a68d080

Please sign in to comment.