зеркало из https://github.com/mozilla/treeherder.git
Merge pull request #111 from lightsofapollo/oauth-small-tweaks
Two small tweaks (add default for TREEHERDER_RO_DATABASE_USER and pass token)
This commit is contained in:
Коммит
03bcbc0d83
|
@ -14,6 +14,9 @@ TREEHERDER_DATABASE_PASSWORD = os.environ.get("TREEHERDER_DATABASE_PASSWORD", ""
|
|||
TREEHERDER_DATABASE_HOST = os.environ.get("TREEHERDER_DATABASE_HOST", "localhost")
|
||||
TREEHERDER_DATABASE_PORT = os.environ.get("TREEHERDER_DATABASE_PORT", "")
|
||||
|
||||
TREEHERDER_RO_DATABASE_USER = os.environ.get("TREEHERDER_RO_DATABASE_USER", "TREEHERDER_DATABASE_USER")
|
||||
TREEHERDER_RO_DATABASE_PASSWORD = os.environ.get("TREEHERDER_RO_DATABASE_PASSWORD", "TREEHERDER_DATABASE_PASSWORD")
|
||||
|
||||
TREEHERDER_MEMCACHED = os.environ.get("TREEHERDER_MEMCACHED", "")
|
||||
TREEHERDER_MEMCACHED_KEY_PREFIX = os.environ.get("TREEHERDER_MEMCACHED_KEY_PREFIX", "treeherder")
|
||||
DEBUG = os.environ.get("TREEHERDER_DEBUG", False)
|
||||
|
|
|
@ -98,7 +98,7 @@ def oauth_required(func):
|
|||
|
||||
try:
|
||||
#verify oauth django request and consumer object match
|
||||
server.verify_request(req_obj, cons_obj, oauth_token)
|
||||
server.verify_request(req_obj, cons_obj, token)
|
||||
except oauth.Error:
|
||||
msg = {
|
||||
'response':"invalid_client",
|
||||
|
|
Загрузка…
Ссылка в новой задаче