Merge pull request #1807 from abastardi/janrain-fix

Fix Janrain due to change in behavior
This commit is contained in:
mdipierro
2017-11-22 14:50:30 -06:00
committed by GitHub
2 changed files with 10 additions and 4 deletions

View File

@@ -78,10 +78,13 @@ class RPXAccount(object):
def get_user(self):
request = self.request
if request.vars.token:
# Janrain now sends the token via both a POST body and the query
# string, so we should keep only one of these.
token = request.post_vars.token or request.get_vars.token
if token:
user = Storage()
data = urllib.urlencode(
dict(apiKey=self.api_key, token=request.vars.token))
dict(apiKey=self.api_key, token=token))
auth_info_json = fetch(self.auth_url + '?' + data)
auth_info = json.loads(auth_info_json)

View File

@@ -78,10 +78,13 @@ class RPXAccount(object):
def get_user(self):
request = self.request
if request.vars.token:
# Janrain now sends the token via both a POST body and the query
# string, so we should keep only one of these.
token = request.post_vars.token or request.get_vars.token
if token:
user = Storage()
data = urllib.urlencode(
dict(apiKey=self.api_key, token=request.vars.token))
dict(apiKey=self.api_key, token=token))
auth_info_json = fetch(self.auth_url + '?' + data)
auth_info = json.loads(auth_info_json)