]> BookStack Code Mirror - bookstack/blob - app/Config/oidc.php
Added OIDC group sync functionality
[bookstack] / app / Config / oidc.php
1 <?php
2
3 return [
4
5     // Display name, shown to users, for OpenId option
6     'name' => env('OIDC_NAME', 'SSO'),
7
8     // Dump user details after a login request for debugging purposes
9     'dump_user_details' => env('OIDC_DUMP_USER_DETAILS', false),
10
11     // Attribute, within a OpenId token, to find the user's display name
12     'display_name_claims' => explode('|', env('OIDC_DISPLAY_NAME_CLAIMS', 'name')),
13
14     // OAuth2/OpenId client id, as configured in your Authorization server.
15     'client_id' => env('OIDC_CLIENT_ID', null),
16
17     // OAuth2/OpenId client secret, as configured in your Authorization server.
18     'client_secret' => env('OIDC_CLIENT_SECRET', null),
19
20     // The issuer of the identity token (id_token) this will be compared with
21     // what is returned in the token.
22     'issuer' => env('OIDC_ISSUER', null),
23
24     // Auto-discover the relevant endpoints and keys from the issuer.
25     // Fetched details are cached for 15 minutes.
26     'discover' => env('OIDC_ISSUER_DISCOVER', false),
27
28     // Public key that's used to verify the JWT token with.
29     // Can be the key value itself or a local 'file://public.key' reference.
30     'jwt_public_key' => env('OIDC_PUBLIC_KEY', null),
31
32     // OAuth2 endpoints.
33     'authorization_endpoint' => env('OIDC_AUTH_ENDPOINT', null),
34     'token_endpoint'         => env('OIDC_TOKEN_ENDPOINT', null),
35
36     // Add extra scopes, upon those required, to the OIDC authentication request
37     // Multiple values can be provided comma seperated.
38     'additional_scopes' => env('OIDC_ADDITIONAL_SCOPES', null),
39
40     // Group sync options
41     // Enable syncing, upon login, of OIDC groups to BookStack roles
42     'user_to_groups' => env('OIDC_USER_TO_GROUPS', false),
43     // Attribute, within a OIDC ID token, to find group names within
44     'group_attribute' => env('OIDC_GROUP_ATTRIBUTE', 'groups'),
45     // When syncing groups, remove any groups that no longer match. Otherwise sync only adds new groups.
46     'remove_from_groups' => env('OIDC_REMOVE_FROM_GROUPS', false),
47 ];