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