auth.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | LARAVEL8.0 框架 [ LARAVEL ][ RXThinkCMF ]
  4. // +----------------------------------------------------------------------
  5. // | 版权所有 2017~2021 LARAVEL研发中心
  6. // +----------------------------------------------------------------------
  7. // | 官方网站: http://www.laravel.cn
  8. // +----------------------------------------------------------------------
  9. // | Author: laravel开发员 <laravel.qq.com>
  10. // +----------------------------------------------------------------------
  11. return [
  12. /*
  13. |--------------------------------------------------------------------------
  14. | Authentication Defaults
  15. |--------------------------------------------------------------------------
  16. |
  17. | This option controls the default authentication "guard" and password
  18. | reset options for your application. You may change these defaults
  19. | as required, but they're a perfect start for most applications.
  20. |
  21. */
  22. 'defaults' => [
  23. 'guard' => 'web',
  24. 'passwords' => 'users',
  25. ],
  26. /*
  27. |--------------------------------------------------------------------------
  28. | Authentication Guards
  29. |--------------------------------------------------------------------------
  30. |
  31. | Next, you may define every authentication guard for your application.
  32. | Of course, a great default configuration has been defined for you
  33. | here which uses session storage and the Eloquent user provider.
  34. |
  35. | All authentication drivers have a user provider. This defines how the
  36. | users are actually retrieved out of your database or other storage
  37. | mechanisms used by this application to persist your user's data.
  38. |
  39. | Supported: "session", "token"
  40. |
  41. */
  42. 'guards' => [
  43. 'web' => [
  44. 'driver' => 'session',
  45. 'provider' => 'users',
  46. ],
  47. 'api' => [
  48. 'driver' => 'token',
  49. 'provider' => 'users',
  50. 'hash' => false,
  51. ],
  52. ],
  53. /*
  54. |--------------------------------------------------------------------------
  55. | User Providers
  56. |--------------------------------------------------------------------------
  57. |
  58. | All authentication drivers have a user provider. This defines how the
  59. | users are actually retrieved out of your database or other storage
  60. | mechanisms used by this application to persist your user's data.
  61. |
  62. | If you have multiple user tables or models you may configure multiple
  63. | sources which represent each model / table. These sources may then
  64. | be assigned to any extra authentication guards you have defined.
  65. |
  66. | Supported: "database", "eloquent"
  67. |
  68. */
  69. 'providers' => [
  70. 'users' => [
  71. 'driver' => 'eloquent',
  72. 'model' => App\Models\User::class,
  73. ],
  74. // 'users' => [
  75. // 'driver' => 'database',
  76. // 'table' => 'users',
  77. // ],
  78. ],
  79. /*
  80. |--------------------------------------------------------------------------
  81. | Resetting Passwords
  82. |--------------------------------------------------------------------------
  83. |
  84. | You may specify multiple password reset configurations if you have more
  85. | than one user table or model in the application and you want to have
  86. | separate password reset settings based on the specific user types.
  87. |
  88. | The expire time is the number of minutes that the reset token should be
  89. | considered valid. This security feature keeps tokens short-lived so
  90. | they have less time to be guessed. You may change this as needed.
  91. |
  92. */
  93. 'passwords' => [
  94. 'users' => [
  95. 'provider' => 'users',
  96. 'table' => 'password_resets',
  97. 'expire' => 60,
  98. 'throttle' => 60,
  99. ],
  100. ],
  101. /*
  102. |--------------------------------------------------------------------------
  103. | Password Confirmation Timeout
  104. |--------------------------------------------------------------------------
  105. |
  106. | Here you may define the amount of seconds before a password confirmation
  107. | times out and the user is prompted to re-enter their password via the
  108. | confirmation screen. By default, the timeout lasts for three hours.
  109. |
  110. */
  111. 'password_timeout' => 10800,
  112. ];