auth.php 4.1 KB

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