Skip to content

Commit ed3c847

Browse files
author
Peter Petruš
committed
Fixed NBF time checking issue.
1 parent 6da3568 commit ed3c847

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# passport-token
2-
Dirty Decoder for Laravel Passport (Bearer) Access Token.
2+
Decoder for Laravel Passport (Bearer) Access Token.
33

44
## Functionality
55

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
22
"name": "peterpetrus/passport-token",
3-
"description": "Dirty Decoder for Laravel Passport (Bearer) Access Token",
3+
"description": "Decoder for Laravel Passport (Bearer) Access Token",
44
"license": "MIT",
55
"require": {
6-
"php": "^5.3.3 || ^7.0 || ^8.0"
6+
"php": "^5.3.3 || ^7.0 || ^8.0",
7+
"ext-json": "*"
78
},
89
"autoload": {
910
"classmap": [

src/PassportToken.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public static function existsValidToken($token_id, $user_id)
9393
*/
9494
public static function dirtyDecode($access_token, $claims = array())
9595
{
96-
$now = time();
96+
$now = microtime(true);
9797
$expecting = false;
9898
$incorrect = false;
9999
$expired = false;

0 commit comments

Comments
 (0)