]> BookStack Code Mirror - bookstack/blob - app/Config/auth.php
Skip intermediate login page with single provider
[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 redirect to external login provider if only one provider is being used
17     // instead of displaying a single-button login page and requiring users to click through
18     // Supported methods: saml2, oidc
19     'auto_redirect' => env('AUTH_AUTO_REDIRECT', false),
20
21     // Authentication Defaults
22     // This option controls the default authentication "guard" and password
23     // reset options for your application.
24     'defaults' => [
25         'guard'     => env('AUTH_METHOD', 'standard'),
26         'passwords' => 'users',
27     ],
28
29     // Authentication Guards
30     // All authentication drivers have a user provider. This defines how the
31     // users are actually retrieved out of your database or other storage
32     // mechanisms used by this application to persist your user's data.
33     // Supported drivers: "session", "api-token", "ldap-session", "async-external-session"
34     'guards' => [
35         'standard' => [
36             'driver'   => 'session',
37             'provider' => 'users',
38         ],
39         'ldap' => [
40             'driver'   => 'ldap-session',
41             'provider' => 'external',
42         ],
43         'saml2' => [
44             'driver'   => 'async-external-session',
45             'provider' => 'external',
46         ],
47         'oidc' => [
48             'driver'   => 'async-external-session',
49             'provider' => 'external',
50         ],
51         'api' => [
52             'driver'   => 'api-token',
53         ],
54     ],
55
56     // User Providers
57     // All authentication drivers have a user provider. This defines how the
58     // users are actually retrieved out of your database or other storage
59     // mechanisms used by this application to persist your user's data.
60     'providers' => [
61         'users' => [
62             'driver' => 'eloquent',
63             'model'  => \BookStack\Auth\User::class,
64         ],
65
66         'external' => [
67             'driver' => 'external-users',
68             'model'  => \BookStack\Auth\User::class,
69         ],
70
71         // 'users' => [
72         //     'driver' => 'database',
73         //     'table' => 'users',
74         // ],
75     ],
76
77     // Resetting Passwords
78     // The expire time is the number of minutes that the reset token should be
79     // considered valid. This security feature keeps tokens short-lived so
80     // they have less time to be guessed. You may change this as needed.
81     'passwords' => [
82         'users' => [
83             'provider' => 'users',
84             'email'    => 'emails.password',
85             'table'    => 'password_resets',
86             'expire'   => 60,
87             'throttle' => 60,
88         ],
89     ],
90
91     // Password Confirmation Timeout
92     // Here you may define the amount of seconds before a password confirmation
93     // times out and the user is prompted to re-enter their password via the
94     // confirmation screen. By default, the timeout lasts for three hours.
95     'password_timeout' => 10800,
96
97 ];