Update oauth2.py

refresh access token is now available also for developers, not only for the library
This commit is contained in:
eugenio412 2016-06-10 13:36:14 +02:00 committed by GitHub
parent 0b9a0276c1
commit 891731c78e

View File

@ -134,7 +134,7 @@ class SpotifyOAuth(object):
return None return None
if self._is_token_expired(token_info): if self._is_token_expired(token_info):
token_info = self._refresh_access_token(token_info['refresh_token']) token_info = self.refresh_access_token(token_info['refresh_token'])
except IOError: except IOError:
pass pass
@ -221,7 +221,7 @@ class SpotifyOAuth(object):
else: else:
return None return None
def _refresh_access_token(self, refresh_token): def refresh_access_token(self, refresh_token):
payload = { 'refresh_token': refresh_token, payload = { 'refresh_token': refresh_token,
'grant_type': 'refresh_token'} 'grant_type': 'refresh_token'}