From b2eacd2b590495100f0f7880bf2d4b9071f4fe31 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 5 Dec 2012 10:41:38 -0500 Subject: [PATCH] github and dropbox secret's moved out from config.json to env --- ChangeLog | 3 +++ README.md | 6 ++++-- lib/server.js | 2 +- lib/server/auth.js | 5 ++--- shell/secret.sh | 0 5 files changed, 10 insertions(+), 6 deletions(-) mode change 100644 => 100755 shell/secret.sh diff --git a/ChangeLog b/ChangeLog index fc951cef..9841de6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -164,6 +164,9 @@ Added dropbox_id option. * Added getCurrentPath function to Util module. +* GitHub and DropBox secret's moved out from +config.json to env. + 2012.10.01, Version 0.1.7 diff --git a/README.md b/README.md index 8babfbed..1b025cc1 100644 --- a/README.md +++ b/README.md @@ -99,8 +99,10 @@ Authorization --------------- Thru openID Cloud Commander could authorize clients on GitHub. All things that should be done is must be added **id** and **secret** of application -from github settings page and added to **config.json** or env varibles with names: -*github_id* and *github_secret* that is more secure way. +from github settings page and added to **config.json** (id just) and env varible (secret) +with names: *github_id*, *github_secret*, *dropbox_key*, *dropbox_secret* etc. +For more information see *config.json* and *shell/seret.bat* (**on win32**) +or **shell/secret.sh** (**on *nix**). Starting diff --git a/lib/server.js b/lib/server.js index 1e03aad2..9a9e6671 100644 --- a/lib/server.js +++ b/lib/server.js @@ -59,7 +59,7 @@ Server : {}, /* КОНСТАНТЫ */ - INDEX : main.DIR + '/' + 'index.html' + INDEX : main.DIR + 'index.html' }, DirPath = '/', diff --git a/lib/server/auth.js b/lib/server/auth.js index df87ee0e..9ff9ba17 100644 --- a/lib/server/auth.js +++ b/lib/server/auth.js @@ -48,11 +48,10 @@ function authenticate(pCode, pCallBack) { var lId = Config.github_id, - lSecret = Config.github_secret, lEnv = process.env, - lClientId = lEnv.github_id || lId, - lClientSecret = lEnv.github_secret || lSecret; + lClientId = lEnv.github_id || lId, + lClientSecret = lEnv.github_secret; var data = qs.stringify({ client_id : lClientId, diff --git a/shell/secret.sh b/shell/secret.sh old mode 100644 new mode 100755