]> BookStack Code Mirror - bookstack/blob - app/Config/auth.php
Merge pull request #5627 from BookStackApp/lexical_20250525
[bookstack] / app / Config / auth.php
1 <?php
2
3 /**
4  * Authentication configuration options.
5  *
6  * Changes to these config files are not supported by BookStack and may break upon updates.
7  * Configuration should be altered via the `.env` file or environment variables.
8  * Do not edit this file unless you're happy to maintain any changes yourself.
9  */
10
11 return [
12
13     // Options: standard, ldap, saml2, oidc
14     'method' => env('AUTH_METHOD', 'standard'),
15
16     // Automatically initiate login via external auth system if it's the sole auth method.
17     // Works with saml2 or oidc auth methods.
18     'auto_initiate' => env('AUTH_AUTO_INITIATE', false),
19
20     // Authentication Defaults
21     // This option controls the default authentication "guard" and password
22     // reset options for your application.
23     'defaults' => [
24         'guard'     => env('AUTH_METHOD', 'standard'),
25         'passwords' => 'users',
26     ],
27
28     // Authentication Guards
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     // Supported drivers: "session", "api-token", "ldap-session", "async-external-session"
33     'guards' => [
34         'standard' => [
35             'driver'   => 'session',
36             'provider' => 'users',
37         ],
38         'ldap' => [
39             'driver'   => 'ldap-session',
40             'provider' => 'external',
41         ],
42         'saml2' => [
43             'driver'   => 'async-external-session',
44             'provider' => 'external',
45         ],
46         'oidc' => [
47             'driver'   => 'async-external-session',
48             'provider' => 'external',
49         ],
50         'api' => [
51             'driver'   => 'api-token',
52         ],
53     ],
54
55     // User Providers
56     // All authentication drivers have a user provider. This defines how the
57     // users are actually retrieved out of your database or other storage
58     // mechanisms used by this application to persist your user's data.
59     'providers' => [
60         'users' => [
61             'driver' => 'eloquent',
62             'model'  => \BookStack\Users\Models\User::class,
63         ],
64
65         'external' => [
66             'driver' => 'external-users',
67             'model'  => \BookStack\Users\Models\User::class,
68         ],
69
70         // 'users' => [
71         //     'driver' => 'database',
72         //     'table' => 'users',
73         // ],
74     ],
75
76     // Resetting Passwords
77     // The expire time is the number of minutes that the reset token should be
78     // considered valid. This security feature keeps tokens short-lived so
79     // they have less time to be guessed. You may change this as needed.
80     'passwords' => [
81         'users' => [
82             'provider' => 'users',
83             'email'    => 'emails.password',
84             'table'    => 'password_resets',
85             'expire'   => 60,
86             'throttle' => 60,
87         ],
88     ],
89
90     // Password Confirmation Timeout
91     // Here you may define the amount of seconds before a password confirmation
92     // times out and the user is prompted to re-enter their password via the
93     // confirmation screen. By default, the timeout lasts for three hours.
94     'password_timeout' => 10800,
95
96 ];
Morty Proxy This is a proxified and sanitized view of the page, visit original site.