cryptpad/config/sso.example.js

38 lines
1.2 KiB
JavaScript
Raw Normal View History

2023-12-15 22:38:01 +08:00
// SPDX-FileCopyrightText: 2023 XWiki CryptPad Team <contact@cryptpad.org> and contributors
//
// SPDX-License-Identifier: AGPL-3.0-or-later
2023-12-16 00:10:21 +08:00
//const fs = require('node:fs');
2023-06-23 23:46:14 +08:00
module.exports = {
// Enable SSO login on this instance
enabled: false,
// Block registration for non-SSO users on this instance
enforced: false,
// Allow users to add an additional CryptPad password to their SSO account
cpPassword: false,
2023-12-15 23:06:25 +08:00
// You can also force your SSO users to add a CryptPad password
forceCpPassword: false,
2023-06-23 23:46:14 +08:00
// List of SSO providers
list: [
/*
{
name: 'google',
type: 'oidc',
url: 'https://accounts.google.com',
client_id: "{your_client_id}",
2023-10-18 21:39:54 +08:00
client_secret: "{your_client_secret}",
jwt_alg: 'RS256' (optional)
2023-12-15 23:06:25 +08:00
}, {
name: 'samltest',
type: 'saml',
url: 'https://samltest.id/idp/profile/SAML2/Redirect/SSO',
issuer: 'your-cryptpad-issuer-id',
cert: String or fs.readFileSync("./your/cert/location", "utf-8"),
privateKey: fs.readFileSync("./your/private/key/location", "utf-8"),
signingCert: fs.readFileSync("./your/signing/cert/location", "utf-8"),
2023-06-23 23:46:14 +08:00
}
*/
]
};