Skip to content

Commit

Permalink
#12 : oauth_session_handle added to request header OK
Browse files Browse the repository at this point in the history
  • Loading branch information
josuebrunel committed Apr 25, 2015
1 parent cade056 commit 5f9cf39
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions myql/contrib/auth/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,8 @@ def isValid(self):
def refresh_token(self):
"""Refresh access token
"""
oauth = OAuth1(self.consumer_key, resource_owner_key=self.access_token, callback_uri=CALLBACK_URI)
oauth.client.oauth_session_handle = self.session_handle
response = requests.post(REQUEST_TOKEN_URL, auth=oauth)
oauth = OAuth1(self.consumer_key, resource_owner_key=self.access_token,resource_owner_secret=self.access_token_secret, callback_uri=CALLBACK_URI)
response = requests.post(REQUEST_TOKEN_URL, headers={'oauth_session_handle': self.session_handle}, auth=oauth)
tokens = self.fetch_tokens(response.content)
return tokens

Expand Down

0 comments on commit 5f9cf39

Please sign in to comment.