From 5cda55086acfc1000f0a0062045db50ad415db59 Mon Sep 17 00:00:00 2001 From: Christoph Witzany Date: Sun, 29 Oct 2017 11:16:40 +0100 Subject: Add mattermost authentication --- lib/config/default.js | 5 +++++ lib/config/dockerSecret.js | 4 ++++ lib/config/environment.js | 5 +++++ lib/config/index.js | 1 + 4 files changed, 15 insertions(+) (limited to 'lib/config') diff --git a/lib/config/default.js b/lib/config/default.js index e7e2e4b3..273bad02 100644 --- a/lib/config/default.js +++ b/lib/config/default.js @@ -74,6 +74,11 @@ module.exports = { clientSecret: undefined, scope: undefined }, + mattermost: { + baseURL: undefined, + clientID: undefined, + clientSecret: undefined + }, dropbox: { clientID: undefined, clientSecret: undefined diff --git a/lib/config/dockerSecret.js b/lib/config/dockerSecret.js index eea2fafd..ac54fd19 100644 --- a/lib/config/dockerSecret.js +++ b/lib/config/dockerSecret.js @@ -38,6 +38,10 @@ if (fs.existsSync(basePath)) { clientID: getSecret('gitlab_clientID'), clientSecret: getSecret('gitlab_clientSecret') }, + mattermost: { + clientID: getSecret('mattermost_clientID'), + clientSecret: getSecret('mattermost_clientSecret') + }, dropbox: { clientID: getSecret('dropbox_clientID'), clientSecret: getSecret('dropbox_clientSecret') diff --git a/lib/config/environment.js b/lib/config/environment.js index 6f33d140..0c272f05 100644 --- a/lib/config/environment.js +++ b/lib/config/environment.js @@ -49,6 +49,11 @@ module.exports = { clientSecret: process.env.HMD_GITLAB_CLIENTSECRET, scope: process.env.HMD_GITLAB_SCOPE }, + mattermost: { + baseURL: process.env.HMD_MATTERMOST_BASEURL, + clientID: process.env.HMD_MATTERMOST_CLIENTID, + clientSecret: process.env.HMD_MATTERMOST_CLIENTSECRET + }, dropbox: { clientID: process.env.HMD_DROPBOX_CLIENTID, clientSecret: process.env.HMD_DROPBOX_CLIENTSECRET diff --git a/lib/config/index.js b/lib/config/index.js index dfad28ed..addd8ba6 100644 --- a/lib/config/index.js +++ b/lib/config/index.js @@ -90,6 +90,7 @@ config.isTwitterEnable = config.twitter.consumerKey && config.twitter.consumerSe config.isEmailEnable = config.email config.isGitHubEnable = config.github.clientID && config.github.clientSecret config.isGitLabEnable = config.gitlab.clientID && config.gitlab.clientSecret +config.isMattermostEnable = config.mattermost.clientID && config.mattermost.clientSecret config.isLDAPEnable = config.ldap.url config.isPDFExportEnable = config.allowpdfexport -- cgit v1.2.3