diff options
author | Christoph (Sheogorath) Kern | 2018-06-04 15:54:47 +0200 |
---|---|---|
committer | GitHub | 2018-06-04 15:54:47 +0200 |
commit | 551840ad57125fa168247c21613f9d6de6cd5d99 (patch) | |
tree | 51dda6767b42acc445fb169ea8ea6b4fe19050ac /lib/config | |
parent | 3f7a33df646c4db3de449bd486a7dfddc9ba6e6b (diff) | |
parent | 34df7ccce83bebec1db3b6995eb25cb6fe4fdbd4 (diff) |
Merge pull request #784 from pferreir/add-oauth2-support
Add "generic" OAuth2 support
Diffstat (limited to 'lib/config')
-rw-r--r-- | lib/config/default.js | 6 | ||||
-rw-r--r-- | lib/config/environment.js | 11 | ||||
-rw-r--r-- | lib/config/index.js | 1 |
3 files changed, 18 insertions, 0 deletions
diff --git a/lib/config/default.js b/lib/config/default.js index 30ce2090..1b124b3e 100644 --- a/lib/config/default.js +++ b/lib/config/default.js @@ -79,6 +79,12 @@ module.exports = { container: undefined }, // authentication + oauth2: { + authorizationURL: undefined, + tokenURL: undefined, + clientID: undefined, + clientSecret: undefined + }, facebook: { clientID: undefined, clientSecret: undefined diff --git a/lib/config/environment.js b/lib/config/environment.js index 810cb225..e1c11569 100644 --- a/lib/config/environment.js +++ b/lib/config/environment.js @@ -72,6 +72,17 @@ module.exports = { clientID: process.env.HMD_MATTERMOST_CLIENTID, clientSecret: process.env.HMD_MATTERMOST_CLIENTSECRET }, + oauth2: { + baseURL: process.env.HMD_OAUTH2_BASEURL, + userProfileURL: process.env.HMD_OAUTH2_USER_PROFILE_URL, + userProfileUsernameAttr: process.env.HMD_OAUTH2_USER_PROFILE_USERNAME_ATTR, + userProfileDisplayNameAttr: process.env.HMD_OAUTH2_USER_PROFILE_DISPLAY_NAME_ATTR, + userProfileEmailAttr: process.env.HMD_OAUTH2_USER_PROFILE_EMAIL_ATTR, + tokenURL: process.env.HMD_OAUTH2_TOKEN_URL, + authorizationURL: process.env.HMD_OAUTH2_AUTHORIZATION_URL, + clientID: process.env.HMD_OAUTH2_CLIENT_ID, + clientSecret: process.env.HMD_OAUTH2_CLIENT_SECRET + }, 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 f10eadb8..484301c4 100644 --- a/lib/config/index.js +++ b/lib/config/index.js @@ -99,6 +99,7 @@ config.isGitLabEnable = config.gitlab.clientID && config.gitlab.clientSecret config.isMattermostEnable = config.mattermost.clientID && config.mattermost.clientSecret config.isLDAPEnable = config.ldap.url config.isSAMLEnable = config.saml.idpSsoUrl +config.isOAuth2Enable = config.oauth2.clientID && config.oauth2.clientSecret config.isPDFExportEnable = config.allowPDFExport // merge legacy values |