]> BookStack Code Mirror - bookstack/blob - app/Config/auth.php
Merge branch 'oidc'
[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     // Method of authentication to use
14     // Options: standard, ldap, saml2, oidc
15     'method' => env('AUTH_METHOD', 'standard'),
16
17     // Authentication Defaults
18     // This option controls the default authentication "guard" and password
19     // reset options for your application.
20     'defaults' => [
21         'guard'     => env('AUTH_METHOD', 'standard'),
22         'passwords' => 'users',
23     ],
24
25     // Authentication Guards
26     // All authentication drivers have a user provider. This defines how the
27     // users are actually retrieved out of your database or other storage
28     // mechanisms used by this application to persist your user's data.
29     // Supported drivers: "session", "api-token", "ldap-session", "async-external-session"
30     'guards' => [
31         'standard' => [
32             'driver'   => 'session',
33             'provider' => 'users',
34         ],
35         'ldap' => [
36             'driver'   => 'ldap-session',
37             'provider' => 'external',
38         ],
39         'saml2' => [
40             'driver'   => 'async-external-session',
41             'provider' => 'external',
42         ],
43         'oidc' => [
44             'driver' => 'async-external-session',
45             'provider' => 'external',
46         ],
47         'api' => [
48             'driver' => 'api-token',
49         ],
50     ],
51
52     // User Providers
53     // All authentication drivers have a user provider. This defines how the
54     // users are actually retrieved out of your database or other storage
55     // mechanisms used by this application to persist your user's data.
56     'providers' => [
57         'users' => [
58             'driver' => 'eloquent',
59             'model'  => \BookStack\Auth\User::class,
60         ],
61         'external' => [
62             'driver' => 'external-users',
63             'model'  => \BookStack\Auth\User::class,
64         ],
65     ],
66
67     // Resetting Passwords
68     // The expire time is the number of minutes that the reset token should be
69     // considered valid. This security feature keeps tokens short-lived so
70     // they have less time to be guessed. You may change this as needed.
71     'passwords' => [
72         'users' => [
73             'provider' => 'users',
74             'email'    => 'emails.password',
75             'table'    => 'password_resets',
76             'expire'   => 60,
77             'throttle' => 60,
78         ],
79     ],
80
81 ];