1 <?php |
1 <?php |
2 |
|
3 return [ |
2 return [ |
4 |
3 |
5 /* |
4 /* |
6 |-------------------------------------------------------------------------- |
5 |-------------------------------------------------------------------------- |
7 | Default Authentication Driver |
6 | Authentication Defaults |
8 |-------------------------------------------------------------------------- |
7 |-------------------------------------------------------------------------- |
9 | |
8 | |
10 | This option controls the authentication driver that will be utilized. |
9 | This option controls the default authentication "guard" and password |
11 | This driver manages the retrieval and authentication of the users |
10 | reset options for your application. You may change these defaults |
12 | attempting to get access to protected areas of your application. |
11 | as required, but they're a perfect start for most applications. |
|
12 | |
|
13 */ |
|
14 |
|
15 'defaults' => [ |
|
16 'guard' => 'web', |
|
17 'passwords' => 'users', |
|
18 ], |
|
19 |
|
20 /* |
|
21 |-------------------------------------------------------------------------- |
|
22 | Authentication Guards |
|
23 |-------------------------------------------------------------------------- |
|
24 | |
|
25 | Next, you may define every authentication guard for your application. |
|
26 | Of course, a great default configuration has been defined for you |
|
27 | here which uses session storage and the Eloquent user provider. |
|
28 | |
|
29 | All authentication drivers have a user provider. This defines how the |
|
30 | users are actually retrieved out of your database or other storage |
|
31 | mechanisms used by this application to persist your user's data. |
|
32 | |
|
33 | Supported: "session", "token" |
|
34 | |
|
35 */ |
|
36 |
|
37 'guards' => [ |
|
38 'web' => [ |
|
39 'driver' => 'session', |
|
40 'provider' => 'users', |
|
41 ], |
|
42 |
|
43 'api' => [ |
|
44 'driver' => 'token', |
|
45 'provider' => 'users', |
|
46 ], |
|
47 ], |
|
48 |
|
49 /* |
|
50 |-------------------------------------------------------------------------- |
|
51 | User Providers |
|
52 |-------------------------------------------------------------------------- |
|
53 | |
|
54 | All authentication drivers have a user provider. This defines how the |
|
55 | users are actually retrieved out of your database or other storage |
|
56 | mechanisms used by this application to persist your user's data. |
|
57 | |
|
58 | If you have multiple user tables or models you may configure multiple |
|
59 | sources which represent each model / table. These sources may then |
|
60 | be assigned to any extra authentication guards you have defined. |
13 | |
61 | |
14 | Supported: "database", "eloquent" |
62 | Supported: "database", "eloquent" |
15 | |
63 | |
16 */ |
64 */ |
17 |
65 |
18 'driver' => 'eloquent', |
66 'providers' => [ |
|
67 'users' => [ |
|
68 'driver' => 'eloquent', |
|
69 'model' => CorpusParole\User::class, |
|
70 ], |
|
71 |
|
72 // 'users' => [ |
|
73 // 'driver' => 'database', |
|
74 // 'table' => 'users', |
|
75 // ], |
|
76 ], |
19 |
77 |
20 /* |
78 /* |
21 |-------------------------------------------------------------------------- |
79 |-------------------------------------------------------------------------- |
22 | Authentication Model |
80 | Resetting Passwords |
23 |-------------------------------------------------------------------------- |
|
24 | |
|
25 | When using the "Eloquent" authentication driver, we need to know which |
|
26 | Eloquent model should be used to retrieve your users. Of course, it |
|
27 | is often just the "User" model but you may use whatever you like. |
|
28 | |
|
29 */ |
|
30 |
|
31 'model' => 'CorpusParole\User', |
|
32 |
|
33 /* |
|
34 |-------------------------------------------------------------------------- |
|
35 | Authentication Table |
|
36 |-------------------------------------------------------------------------- |
|
37 | |
|
38 | When using the "Database" authentication driver, we need to know which |
|
39 | table should be used to retrieve your users. We have chosen a basic |
|
40 | default value but you may easily change it to any table you like. |
|
41 | |
|
42 */ |
|
43 |
|
44 'table' => 'users', |
|
45 |
|
46 /* |
|
47 |-------------------------------------------------------------------------- |
|
48 | Password Reset Settings |
|
49 |-------------------------------------------------------------------------- |
81 |-------------------------------------------------------------------------- |
50 | |
82 | |
51 | Here you may set the options for resetting passwords including the view |
83 | Here you may set the options for resetting passwords including the view |
52 | that is your password reset e-mail. You can also set the name of the |
84 | that is your password reset e-mail. You may also set the name of the |
53 | table that maintains all of the reset tokens for your application. |
85 | table that maintains all of the reset tokens for your application. |
|
86 | |
|
87 | You may specify multiple password reset configurations if you have more |
|
88 | than one user table or model in the application and you want to have |
|
89 | separate password reset settings based on the specific user types. |
54 | |
90 | |
55 | The expire time is the number of minutes that the reset token should be |
91 | The expire time is the number of minutes that the reset token should be |
56 | considered valid. This security feature keeps tokens short-lived so |
92 | considered valid. This security feature keeps tokens short-lived so |
57 | they have less time to be guessed. You may change this as needed. |
93 | they have less time to be guessed. You may change this as needed. |
58 | |
94 | |
59 */ |
95 */ |
60 |
96 |
61 'password' => [ |
97 'passwords' => [ |
62 'email' => 'emails.password', |
98 'users' => [ |
63 'table' => 'password_resets', |
99 'provider' => 'users', |
64 'expire' => 60, |
100 'email' => 'auth.emails.password', |
|
101 'table' => 'password_resets', |
|
102 'expire' => 60, |
|
103 ], |
65 ], |
104 ], |
66 |
105 |
67 ]; |
106 ]; |