aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility/tools.py
diff options
context:
space:
mode:
authorPjotr Prins2018-03-20 09:41:36 +0000
committerPjotr Prins2018-03-20 09:51:06 +0000
commitfd236176d9011887662a0203f9af4a2f206b5af2 (patch)
tree03c02f4fae93dd81bf99e4598a9b857e4099f588 /wqflask/utility/tools.py
parent7ab7a55f68178aa55d9e242d74f2a2d28f6e2aba (diff)
downloadgenenetwork2-fd236176d9011887662a0203f9af4a2f206b5af2.tar.gz
Authentication: some mods around defaults
Diffstat (limited to 'wqflask/utility/tools.py')
-rw-r--r--wqflask/utility/tools.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py
index bae3a7f4..ed54f77c 100644
--- a/wqflask/utility/tools.py
+++ b/wqflask/utility/tools.py
@@ -254,15 +254,18 @@ JS_GN_PATH = get_setting('JS_GN_PATH')
GITHUB_CLIENT_ID = get_setting('GITHUB_CLIENT_ID')
GITHUB_CLIENT_SECRET = get_setting('GITHUB_CLIENT_SECRET')
GITHUB_AUTH_URL = None
-if GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET:
- GITHUB_AUTH_URL = "https://github.com/login/oauth/authorize?client_id="+GITHUB_CLIENT_ID+"&client_secret="+GITHUB_CLIENT_SECRET
-GITHUB_API_URL = get_setting('GITHUB_API_URL')
+if GITHUB_CLIENT_ID != 'UNKNOWN' and GITHUB_CLIENT_SECRET:
+ GITHUB_AUTH_URL = "https://github.com/login/oauth/authorize?client_id=" + \
+ GITHUB_CLIENT_ID+"&client_secret="+GITHUB_CLIENT_SECRET
+ GITHUB_API_URL = get_setting('GITHUB_API_URL')
+
ORCID_CLIENT_ID = get_setting('ORCID_CLIENT_ID')
ORCID_CLIENT_SECRET = get_setting('ORCID_CLIENT_SECRET')
ORCID_AUTH_URL = None
-if ORCID_CLIENT_ID and ORCID_CLIENT_SECRET:
- ORCID_AUTH_URL = "https://sandbox.orcid.org/oauth/authorize?response_type=code&scope=/authenticate&show_login=true&client_id="+ORCID_CLIENT_ID+"&client_secret="+ORCID_CLIENT_SECRET
-ORCID_TOKEN_URL = get_setting('ORCID_TOKEN_URL')
+if ORCID_CLIENT_ID != 'UNKNOWN' and ORCID_CLIENT_SECRET:
+ ORCID_AUTH_URL = "https://sandbox.orcid.org/oauth/authorize?response_type=code&scope=/authenticate&show_login=true&client_id=" +
+ ORCID_CLIENT_ID+"&client_secret="+ORCID_CLIENT_SECRET
+ ORCID_TOKEN_URL = get_setting('ORCID_TOKEN_URL')
ELASTICSEARCH_HOST = get_setting('ELASTICSEARCH_HOST')
ELASTICSEARCH_PORT = get_setting('ELASTICSEARCH_PORT')