From 3d1d03fa87c8ab788760fa74bae01f9dd917f019 Mon Sep 17 00:00:00 2001 From: Sheogorath Date: Thu, 4 Oct 2018 20:43:39 +0200 Subject: Make oauth2 provider name accessible Right now the feature exists but is almost not usable since the only way to configure it is to know that it exists from reading the source code and add it to config.json. This patch provides all needed changes so it can be used by everyone including documentation. Signed-off-by: Sheogorath --- lib/config/default.js | 1 + lib/config/environment.js | 1 + 2 files changed, 2 insertions(+) (limited to 'lib') diff --git a/lib/config/default.js b/lib/config/default.js index c34279bd..d4d26db4 100644 --- a/lib/config/default.js +++ b/lib/config/default.js @@ -83,6 +83,7 @@ module.exports = { }, // authentication oauth2: { + providerName: undefined, authorizationURL: undefined, tokenURL: undefined, clientID: undefined, diff --git a/lib/config/environment.js b/lib/config/environment.js index 6c4ce92f..c345abd9 100644 --- a/lib/config/environment.js +++ b/lib/config/environment.js @@ -75,6 +75,7 @@ module.exports = { clientSecret: process.env.CMD_MATTERMOST_CLIENTSECRET }, oauth2: { + providerName: process.env.CMD_OAUTH2_PROVIDERNAME, baseURL: process.env.CMD_OAUTH2_BASEURL, userProfileURL: process.env.CMD_OAUTH2_USER_PROFILE_URL, userProfileUsernameAttr: process.env.CMD_OAUTH2_USER_PROFILE_USERNAME_ATTR, -- cgit v1.2.3