|
@@ -4,44 +4,58 @@ return [
|
|
|
|
|
|
/*
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
|--------------------------------------------------------------------------
|
|
- | Default Authentication Driver
|
|
|
|
|
|
+ | Authentication Drivers
|
|
|--------------------------------------------------------------------------
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
- | This option controls the authentication driver that will be utilized.
|
|
|
|
- | This driver manages the retrieval and authentication of the users
|
|
|
|
- | attempting to get access to protected areas of your application.
|
|
|
|
|
|
+ | Here you may define every authentication driver for your application.
|
|
|
|
+ | Of course, a default and working configuration is already defined
|
|
|
|
+ | here but you are free to define additional drivers when needed.
|
|
|
|
|
|
|
|
- | Supported: "database", "eloquent"
|
|
|
|
|
|
+ | The "guard" option defines the default driver that will be used when
|
|
|
|
+ | utilizing the "Auth" facade within your application. But, you may
|
|
|
|
+ | access every other auth driver via the facade's "guard" method.
|
|
|
|
|
|
|
|
- */
|
|
|
|
-
|
|
|
|
- 'driver' => 'eloquent',
|
|
|
|
-
|
|
|
|
- /*
|
|
|
|
- |--------------------------------------------------------------------------
|
|
|
|
- | Authentication Model
|
|
|
|
- |--------------------------------------------------------------------------
|
|
|
|
|
|
+ | All authentication drivers have a "provider". A provider defines how
|
|
|
|
+ | users are actually retrieved out of the database or other storage
|
|
|
|
+ | mechanism used by your application to persist your user's data.
|
|
|
|
|
|
|
|
- | When using the "Eloquent" authentication driver, we need to know which
|
|
|
|
- | Eloquent model should be used to retrieve your users. Of course, it
|
|
|
|
- | is often just the "User" model but you may use whatever you like.
|
|
|
|
|
|
+ | Supported: "session"
|
|
|
|
|
|
|
|
*/
|
|
*/
|
|
|
|
|
|
- 'model' => App\User::class,
|
|
|
|
|
|
+ 'guard' => 'session',
|
|
|
|
+
|
|
|
|
+ 'guards' => [
|
|
|
|
+ 'session' => [
|
|
|
|
+ 'driver' => 'session',
|
|
|
|
+ 'provider' => 'eloquent',
|
|
|
|
+ ],
|
|
|
|
+ ],
|
|
|
|
|
|
/*
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
|--------------------------------------------------------------------------
|
|
- | Authentication Table
|
|
|
|
|
|
+ | User Providers
|
|
|--------------------------------------------------------------------------
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
- | When using the "Database" authentication driver, we need to know which
|
|
|
|
- | table should be used to retrieve your users. We have chosen a basic
|
|
|
|
- | default value but you may easily change it to any table you like.
|
|
|
|
|
|
+ | All authentication drivers have a "provider". A provider defines how
|
|
|
|
+ | users are actually retrieved out of the database or other storage
|
|
|
|
+ | mechanism used by your application to persist your user's data.
|
|
|
|
+ |
|
|
|
|
+ | Supported: "database", "eloquent"
|
|
|
|
|
|
|
|
*/
|
|
*/
|
|
|
|
|
|
- 'table' => 'users',
|
|
|
|
|
|
+ 'providers' => [
|
|
|
|
+ 'eloquent' => [
|
|
|
|
+ 'driver' => 'eloquent',
|
|
|
|
+ 'model' => App\User::class,
|
|
|
|
+ ],
|
|
|
|
+
|
|
|
|
+ 'database' => [
|
|
|
|
+ 'driver' => 'database',
|
|
|
|
+ 'table' => 'users',
|
|
|
|
+ ],
|
|
|
|
+ ],
|
|
|
|
|
|
/*
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
|--------------------------------------------------------------------------
|
|
@@ -52,16 +66,25 @@ return [
|
|
| that is your password reset e-mail. You can also set the name of the
|
|
| that is your password reset e-mail. You can also set the name of the
|
|
| table that maintains all of the reset tokens for your application.
|
|
| table that maintains all of the reset tokens for your application.
|
|
|
|
|
|
|
|
|
|
+ | Of course, you may define multiple password "brokers" each with a their
|
|
|
|
+ | own storage settings and user providers. However, for most apps this
|
|
|
|
+ | default configuration of using Eloquent is perfect out of the box.
|
|
|
|
+ |
|
|
| The expire time is the number of minutes that the reset token should be
|
|
| The expire time is the number of minutes that the reset token should be
|
|
| considered valid. This security feature keeps tokens short-lived so
|
|
| considered valid. This security feature keeps tokens short-lived so
|
|
| they have less time to be guessed. You may change this as needed.
|
|
| they have less time to be guessed. You may change this as needed.
|
|
|
|
|
|
|
|
*/
|
|
*/
|
|
|
|
|
|
- 'password' => [
|
|
|
|
- 'email' => 'emails.password',
|
|
|
|
- 'table' => 'password_resets',
|
|
|
|
- 'expire' => 60,
|
|
|
|
|
|
+ 'broker' => 'default',
|
|
|
|
+
|
|
|
|
+ 'brokers' => [
|
|
|
|
+ 'default' => [
|
|
|
|
+ 'provider' => 'eloquent',
|
|
|
|
+ 'email' => 'emails.password',
|
|
|
|
+ 'table' => 'password_resets',
|
|
|
|
+ 'expire' => 60,
|
|
|
|
+ ],
|
|
],
|
|
],
|
|
|
|
|
|
];
|
|
];
|