oauth2.php 651 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. return [
  3. 'private_key' => storage_path('oauth/private.key'),
  4. 'public_key' => storage_path('oauth/public.key'),
  5. 'encryption_key' => env('OAUTH2_ENCRYPTION_KEY'),
  6. 'access_token_expire' => 3600 * 24, // 24小时
  7. 'refresh_token_expire' => 3600 * 24 * 30, // 30天
  8. 'auth_code_expire' => 600, // 10分钟
  9. 'grants' => [
  10. 'password' => [
  11. 'enabled' => true,
  12. ],
  13. 'refresh_token' => [
  14. 'enabled' => true,
  15. ],
  16. 'authorization_code' => [
  17. 'enabled' => true,
  18. ],
  19. 'client_credentials' => [
  20. 'enabled' => true,
  21. ],
  22. ],
  23. ];