auth.php 3.7 KB

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