From 6094c618717bd11793be9f7bd79b8708fac5870f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Sch=C3=A4fer?= <felix@thegcat.net>
Date: Mon, 5 Mar 2018 14:00:55 +0100
Subject: [PATCH] Remove unused LDAP option `tokenSecret`
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

hackmdio/hackmd#754

Signed-off-by: Felix Schäfer <felix@thegcat.net>
---
 README.md                 | 1 -
 config.json.example       | 1 -
 lib/config/default.js     | 1 -
 lib/config/environment.js | 1 -
 4 files changed, 4 deletions(-)

diff --git a/README.md b/README.md
index 3b91a1b..e65eec3 100644
--- a/README.md
+++ b/README.md
@@ -171,7 +171,6 @@ There are some config settings you need to change in the files below.
 | `HMD_LDAP_URL` | `ldap://example.com` | URL of LDAP server |
 | `HMD_LDAP_BINDDN` | no example | bindDn for LDAP access |
 | `HMD_LDAP_BINDCREDENTIALS` | no example | bindCredentials for LDAP access |
-| `HMD_LDAP_TOKENSECRET` | `supersecretkey` | secret used for generating access/refresh tokens |
 | `HMD_LDAP_SEARCHBASE` | `o=users,dc=example,dc=com` | LDAP directory to begin search from |
 | `HMD_LDAP_SEARCHFILTER` | `(uid={{username}})` | LDAP filter to search with |
 | `HMD_LDAP_SEARCHATTRIBUTES` | `displayName, mail` | LDAP attributes to search with (use comma to separate) |
diff --git a/config.json.example b/config.json.example
index 2f5c232..8d1b6ab 100644
--- a/config.json.example
+++ b/config.json.example
@@ -74,7 +74,6 @@
             "url": "ldap://change_this",
             "bindDn": null,
             "bindCredentials": null,
-            "tokenSecret": "change this",
             "searchBase": "change this",
             "searchFilter": "change this",
             "searchAttributes": ["change this"],
diff --git a/lib/config/default.js b/lib/config/default.js
index 5c5ebf3..06e887f 100644
--- a/lib/config/default.js
+++ b/lib/config/default.js
@@ -110,7 +110,6 @@ module.exports = {
     url: undefined,
     bindDn: undefined,
     bindCredentials: undefined,
-    tokenSecret: undefined,
     searchBase: undefined,
     searchFilter: undefined,
     searchAttributes: undefined,
diff --git a/lib/config/environment.js b/lib/config/environment.js
index 754f97d..b83c67e 100644
--- a/lib/config/environment.js
+++ b/lib/config/environment.js
@@ -79,7 +79,6 @@ module.exports = {
     url: process.env.HMD_LDAP_URL,
     bindDn: process.env.HMD_LDAP_BINDDN,
     bindCredentials: process.env.HMD_LDAP_BINDCREDENTIALS,
-    tokenSecret: process.env.HMD_LDAP_TOKENSECRET,
     searchBase: process.env.HMD_LDAP_SEARCHBASE,
     searchFilter: process.env.HMD_LDAP_SEARCHFILTER,
     searchAttributes: toArrayConfig(process.env.HMD_LDAP_SEARCHATTRIBUTES),