jwt.php 693 B

123456789101112131415161718192021
  1. <?php
  2. return [
  3. 'secret' => env('JWT_SECRET'),
  4. //Asymmetric key
  5. 'public_key' => env('JWT_PUBLIC_KEY'),
  6. 'private_key' => env('JWT_PRIVATE_KEY'),
  7. 'password' => env('JWT_PASSWORD'),
  8. //JWT time to live
  9. 'ttl' => env('JWT_TTL', 60),
  10. //Refresh time to live
  11. 'refresh_ttl' => env('JWT_REFRESH_TTL', 20160),
  12. //JWT hashing algorithm
  13. 'algo' => env('JWT_ALGO', 'HS256'),
  14. //token获取方式,数组靠前值优先
  15. 'token_mode' => ['header', 'cookie', 'param'],
  16. //黑名单后有效期
  17. 'blacklist_grace_period' => env('BLACKLIST_GRACE_PERIOD', 10),
  18. 'blacklist_storage' => thans\jwt\provider\storage\Tp5::class,
  19. ];