auth.php 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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' => 'web',
  15. 'passwords' => 'users',
  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' => 'users',
  37. ],
  38. 'api' => [
  39. 'driver' => 'token',
  40. 'provider' => 'users',
  41. ],
  42. ],
  43. /*
  44. |--------------------------------------------------------------------------
  45. | User Providers
  46. |--------------------------------------------------------------------------
  47. |
  48. | All authentication drivers have a user provider. This defines how the
  49. | users are actually retrieved out of your database or other storage
  50. | mechanisms used by this application to persist your user's data.
  51. |
  52. | If you have multiple user tables or models you may configure multiple
  53. | sources which represent each model / table. These sources may then
  54. | be assigned to any extra authentication guards you have defined.
  55. |
  56. | Supported: "database", "eloquent"
  57. |
  58. */
  59. 'providers' => [
  60. 'users' => [
  61. 'driver' => 'eloquent',
  62. 'model' => App\Models\User\AuthKey::class,
  63. ],
  64. ],
  65. /*
  66. |--------------------------------------------------------------------------
  67. | Resetting Passwords
  68. |--------------------------------------------------------------------------
  69. |
  70. | You may specify multiple password reset configurations if you have more
  71. | than one user table or model in the application and you want to have
  72. | separate password reset settings based on the specific user types.
  73. |
  74. | The expire time is the number of minutes that the reset token should be
  75. | considered valid. This security feature keeps tokens short-lived so
  76. | they have less time to be guessed. You may change this as needed.
  77. |
  78. */
  79. 'passwords' => [
  80. 'users' => [
  81. 'provider' => 'users',
  82. 'table' => 'password_resets',
  83. 'expire' => 60,
  84. ],
  85. ],
  86. ];