auth.php 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?php
  2. return [
  3. 'providers' => [
  4. 'users' => [
  5. 'driver' => 'eloquent',
  6. #'model' => \App\User\Models\UserModel::class,
  7. 'table' => 'sys_users',
  8. ],
  9. ],
  10. /*
  11. |--------------------------------------------------------------------------
  12. | Authentication Defaults
  13. |--------------------------------------------------------------------------
  14. |
  15. | This option controls the default authentication "guard" and password
  16. | reset options for your application. You may change these defaults
  17. | as required, but they're a perfect start for most applications.
  18. |
  19. */
  20. 'defaults' => [
  21. 'guard' => env('AUTH_GUARD', 'api'),
  22. ],
  23. /*
  24. |--------------------------------------------------------------------------
  25. | Authentication Guards
  26. |--------------------------------------------------------------------------
  27. |
  28. | Next, you may define every authentication guard for your application.
  29. | Of course, a great default configuration has been defined for you
  30. | here which uses session storage and the Eloquent user provider.
  31. |
  32. | All authentication drivers have a user provider. This defines how the
  33. | users are actually retrieved out of your database or other storage
  34. | mechanisms used by this application to persist your user's data.
  35. |
  36. | Supported: "token"
  37. |
  38. */
  39. 'guards' => [
  40. 'api' => ['driver' => 'api'],
  41. ],
  42. /*
  43. |--------------------------------------------------------------------------
  44. | User Providers
  45. |--------------------------------------------------------------------------
  46. |
  47. | All authentication drivers have a user provider. This defines how the
  48. | users are actually retrieved out of your database or other storage
  49. | mechanisms used by this application to persist your user's data.
  50. |
  51. | If you have multiple user tables or models you may configure multiple
  52. | sources which represent each model / table. These sources may then
  53. | be assigned to any extra authentication guards you have defined.
  54. |
  55. | Supported: "database", "eloquent"
  56. |
  57. */
  58. 'providers' => [
  59. //
  60. ],
  61. /*
  62. |--------------------------------------------------------------------------
  63. | Resetting Passwords
  64. |--------------------------------------------------------------------------
  65. |
  66. | Here you may set the options for resetting passwords including the view
  67. | that is your password reset e-mail. You may also set the name of the
  68. | table that maintains all of the reset tokens for your application.
  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. //
  81. ],
  82. ];