auth.php 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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-member',
  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-member' => [
  35. 'driver' => 'session',
  36. 'provider' => 'members',
  37. ],
  38. 'web-company' => [
  39. 'driver' => 'session',
  40. 'provider' => 'companys',
  41. ],
  42. //20200217 zmw 增加机构认证
  43. 'web-organization' => [
  44. 'driver' => 'session',
  45. 'provider' => 'organization',
  46. ],
  47. /*'web-statistics' => [
  48. 'driver' => 'session',
  49. 'provider' => 'statistics_user',
  50. ],*/
  51. 'api-member' => [
  52. 'driver' => 'token',
  53. 'provider' => 'members',
  54. ],
  55. 'api-company' => [
  56. 'driver' => 'token',
  57. 'provider' => 'companys',
  58. ]
  59. ],
  60. /*
  61. |--------------------------------------------------------------------------
  62. | User Providers
  63. |--------------------------------------------------------------------------
  64. |
  65. | All authentication drivers have a user provider. This defines how the
  66. | users are actually retrieved out of your database or other storage
  67. | mechanisms used by this application to persist your user's data.
  68. |
  69. | If you have multiple user tables or models you may configure multiple
  70. | sources which represent each model / table. These sources may then
  71. | be assigned to any extra authentication guards you have defined.
  72. |
  73. | Supported: "database", "eloquent"
  74. |
  75. */
  76. 'providers' => [
  77. 'members' => [
  78. 'driver' => 'eloquent',
  79. 'model' => App\Models\Member::class,
  80. ],
  81. 'companys' => [
  82. 'driver' => 'eloquent',
  83. 'model' => App\Models\Company::class,
  84. ],
  85. //20200217 zmw 增加机构认证
  86. 'organization' => [
  87. 'driver' => 'eloquent',
  88. 'model' => App\Models\Organization::class,
  89. ],
  90. /*'statistics_user' => [
  91. 'driver' => 'eloquent',
  92. 'model' => App\Models\StatisticsUser::class,
  93. ]*/
  94. // 'users' => [
  95. // 'driver' => 'database',
  96. // 'table' => 'users',
  97. // ],
  98. ],
  99. /*
  100. |--------------------------------------------------------------------------
  101. | Resetting Passwords
  102. |--------------------------------------------------------------------------
  103. |
  104. | You may specify multiple password reset configurations if you have more
  105. | than one user table or model in the application and you want to have
  106. | separate password reset settings based on the specific user types.
  107. |
  108. | The expire time is the number of minutes that the reset token should be
  109. | considered valid. This security feature keeps tokens short-lived so
  110. | they have less time to be guessed. You may change this as needed.
  111. |
  112. */
  113. 'passwords' => [
  114. 'users' => [
  115. 'provider' => 'members',
  116. 'table' => 'password_resets',
  117. 'expire' => 60,
  118. ],
  119. ],
  120. ];