File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -152,18 +152,18 @@ public static function decode(
152
152
153
153
// Check the nbf if it is defined. This is the time that the
154
154
// token can actually be used. If it's not yet that time, abort.
155
- if (isset ($ payload ->nbf ) && $ payload ->nbf > ($ timestamp + static ::$ leeway )) {
155
+ if (isset ($ payload ->nbf ) && floor ( $ payload ->nbf ) > ($ timestamp + static ::$ leeway )) {
156
156
throw new BeforeValidException (
157
- 'Cannot handle token prior to ' . \date (DateTime::ISO8601 , $ payload ->nbf )
157
+ 'Cannot handle token prior to ' . \date (DateTime::ISO8601 , ( int ) $ payload ->nbf )
158
158
);
159
159
}
160
160
161
161
// Check that this token has been created before 'now'. This prevents
162
162
// using tokens that have been created for later use (and haven't
163
163
// correctly used the nbf claim).
164
- if (!isset ($ payload ->nbf ) && isset ($ payload ->iat ) && $ payload ->iat > ($ timestamp + static ::$ leeway )) {
164
+ if (!isset ($ payload ->nbf ) && isset ($ payload ->iat ) && floor ( $ payload ->iat ) > ($ timestamp + static ::$ leeway )) {
165
165
throw new BeforeValidException (
166
- 'Cannot handle token prior to ' . \date (DateTime::ISO8601 , $ payload ->iat )
166
+ 'Cannot handle token prior to ' . \date (DateTime::ISO8601 , ( int ) $ payload ->iat )
167
167
);
168
168
}
169
169
You can’t perform that action at this time.
0 commit comments