【发布时间】:2014-12-28 05:41:36
【问题描述】:
我正在使用 firebase/php-jwt 这个包并尝试在 10 秒后使令牌过期,以查看我是否收到错误,并且令牌似乎仍然有效。我做错了什么?
$key = "example_key";
$token = array(
"iss" => "http://example.org",
"aud" => "http://example.com",
"iat" => 1356999524,
"nbf" => 10000
);
$jwt = JWT::encode($token, $key);
$decoded = JWT::decode($jwt, $key);
print_r($decoded);
【问题讨论】:
标签: php laravel token access-token