From 9f9c4089be2112bfd8a55dd2cb996c811afab898 Mon Sep 17 00:00:00 2001 From: Sheogorath Date: Thu, 31 Aug 2017 23:33:55 +0200 Subject: Add OpenID to CodiMD With OpenID every OpenID capable provider can provide authentication for users of a CodiMD instance. This means we have federated authentication. Signed-off-by: Sheogorath --- lib/config/default.js | 3 ++- lib/config/environment.js | 3 ++- lib/config/index.js | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/config') diff --git a/lib/config/default.js b/lib/config/default.js index cf7d2fc5..acfc2157 100644 --- a/lib/config/default.js +++ b/lib/config/default.js @@ -145,5 +145,6 @@ module.exports = { email: true, allowEmailRegister: true, allowGravatar: true, - allowPDFExport: true + allowPDFExport: true, + openID: true } diff --git a/lib/config/environment.js b/lib/config/environment.js index 6c4ce92f..65bacb4e 100644 --- a/lib/config/environment.js +++ b/lib/config/environment.js @@ -123,5 +123,6 @@ module.exports = { email: toBooleanConfig(process.env.CMD_EMAIL), allowEmailRegister: toBooleanConfig(process.env.CMD_ALLOW_EMAIL_REGISTER), allowGravatar: toBooleanConfig(process.env.CMD_ALLOW_GRAVATAR), - allowPDFExport: toBooleanConfig(process.env.CMD_ALLOW_PDF_EXPORT) + allowPDFExport: toBooleanConfig(process.env.CMD_ALLOW_PDF_EXPORT), + openID: toBooleanConfig(process.env.CMD_OPENID) } diff --git a/lib/config/index.js b/lib/config/index.js index 7d059c5c..f8b68e30 100644 --- a/lib/config/index.js +++ b/lib/config/index.js @@ -96,6 +96,7 @@ config.isGoogleEnable = config.google.clientID && config.google.clientSecret config.isDropboxEnable = config.dropbox.clientID && config.dropbox.clientSecret config.isTwitterEnable = config.twitter.consumerKey && config.twitter.consumerSecret config.isEmailEnable = config.email +config.isOpenIDEnable = config.openID config.isGitHubEnable = config.github.clientID && config.github.clientSecret config.isGitLabEnable = config.gitlab.clientID && config.gitlab.clientSecret config.isMattermostEnable = config.mattermost.clientID && config.mattermost.clientSecret -- cgit v1.2.3