File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 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(
152152
153153 // Check the nbf if it is defined. This is the time that the
154154 // 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 )) {
156156 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 )
158158 );
159159 }
160160
161161 // Check that this token has been created before 'now'. This prevents
162162 // using tokens that have been created for later use (and haven't
163163 // 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 )) {
165165 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 )
167167 );
168168 }
169169
You can’t perform that action at this time.
0 commit comments