jwt.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /*
  3. * This file is part of jwt-auth.
  4. *
  5. * (c) Sean Tymon <tymon148@gmail.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. return [
  11. 'secret' => env('JWT_SECRET'),
  12. 'keys' => [
  13. 'public' => env('JWT_PUBLIC_KEY'),
  14. 'private' => env('JWT_PRIVATE_KEY'),
  15. 'passphrase' => env('JWT_PASSPHRASE'),
  16. ],
  17. 'ttl' => env('JWT_TTL', 86400 * 2),
  18. 'refresh_ttl' => env('JWT_REFRESH_TTL', 20160),
  19. 'algo' => env('JWT_ALGO', 'HS256'),
  20. 'required_claims' => [
  21. 'iss',
  22. 'iat',
  23. 'exp',
  24. 'nbf',
  25. 'sub',
  26. 'jti',
  27. ],
  28. 'persistent_claims' => [
  29. // 'foo',
  30. // 'bar',
  31. ],
  32. 'lock_subject' => true,
  33. 'leeway' => env('JWT_LEEWAY', 0),
  34. 'blacklist_enabled' => env('JWT_BLACKLIST_ENABLED', true),
  35. 'blacklist_grace_period' => env('JWT_BLACKLIST_GRACE_PERIOD', 0),
  36. 'decrypt_cookies' => false,
  37. 'providers' => [
  38. 'jwt' => Tymon\JWTAuth\Providers\JWT\Lcobucci::class,
  39. 'auth' => Tymon\JWTAuth\Providers\Auth\Illuminate::class,
  40. 'storage' => Tymon\JWTAuth\Providers\Storage\Illuminate::class,
  41. ],
  42. ];