Commit Graph

39 Commits

Author SHA1 Message Date
LoisaidaSam f42801ae90 Propagate refresh token error #259
https://github.com/plamere/spotipy/issues/259
(before upstream support)
2018-04-24 18:15:15 -05:00
Paul Lamere d31214642d Merge pull request #206 from lastfm/feature/add-show-dialog-auth-option
Add show_dialog auth url option
2017-09-17 11:57:01 -04:00
Paul Lamere 9054cfecfb Merge pull request #185 from ncordon/patch-1
Changes critical is not for !=
2017-09-17 11:50:08 -04:00
Thomas Hooper 6c3c384bf0 Add show_dialog auth url option
Optional. Whether or not to force the user to approve the app again if they’ve already done so. If false (default), a user who has already approved the application may be automatically redirected to the URI specified by redirect_uri. If true, the user will not be automatically redirected and will have to approve the app again.

From https://developer.spotify.com/web-api/authorization-guide/
2017-08-02 10:36:10 +01:00
Nacho Cordón 5171911342 Changes critical is not for != 2017-04-14 21:04:24 +02:00
Richard Mitic dab5e08b7a Token cache handles null scopes correctly 2017-04-01 10:03:46 +02:00
Paul Lamere dc996b363f Merge pull request #158 from josduj/master
Fixes error when scope is not set
2017-01-18 17:58:22 -05:00
josduj 4f15a6f07e Fixes error when scope is not set 2017-01-18 10:26:14 +01:00
Michael Birtwell d092683be3 Make is_token_expired public
Make is_token_expired_public on SpotifyClientCredentials and SpotifyOAuth.
This method is useful for checking whether tokens that have been stored in cookies etc have timed out. So it's useful for library users to have access to it.

Refactor common implementation of is_token_expired
2017-01-07 16:21:13 +00:00
Paul Lamere f638b0c59b Merge pull request #149 from mbirtwell/python3_with_six
Use six to simplify python 2/3 compatibilty code where possible
2017-01-07 10:55:43 -05:00
Michael Birtwell 72a2fe489d Use six to simplify python 2/3 compatibilty code where possible 2017-01-07 15:18:46 +00:00
Michael Birtwell 5aadb284ff Add support for setting state in get_authorise_url
This allows for example putting a next page url in the state to be loaded after authorization completes.
2017-01-07 13:13:35 +00:00
Paul Lamere c8ff4b960a Fixed proxy issue 2017-01-02 12:11:27 -05:00
Sebastian Bischoff 1ef89cfd2c Merge branch 'master' into proxy 2017-01-02 14:43:40 +01:00
Paul Lamere cb2d385845 Merge pull request #71 from myselfhimself/myselfhimself-scope-subsets
OAuth2: Avoid token renewal when scopes are subset of one another
2016-12-31 18:56:35 -05:00
Paul Lamere 07b6c052e3 Merge pull request #109 from lwoloszy/master
Get new access token 60 seconds before old one times out
2016-12-31 17:56:42 -05:00
Sebastian Bischoff 96e9d3b7df Added support for proxy 2016-08-23 16:48:49 +02:00
Luke Woloszyn ff7b0f3e2a get new access token ~60 seconds before old one times out 2016-07-27 08:10:45 -07:00
eugenio412 83e42efa88 include refresh_access_token method to the library
in this way it's possible to refresh token even if it's not cached but saved somewhere else
2016-04-08 17:12:31 +02:00
myselfhimself 8de2591c18 Avoid unneeded token renewal when cached token's scope contains currently required scope
Before that there was a strict string comparision "cached scope" == "currently required scope". Added a scope subset detection method.
2015-12-02 20:56:44 +01:00
Joona Hoikkala c944cc772f Fixes for the remaining base64 lib references 2015-06-05 13:17:58 +03:00
Joona Hoikkala a541b3bb81 Support both Python 2 & 3 base64 library 2015-06-05 13:12:36 +03:00
Ryan a3a68be7bc ascii decode in _refresh_access_token 2015-06-05 12:21:37 +03:00
Joona Hoikkala d6a14bc83d Urllib compatibility fix to support both python 2 & 3 2015-06-05 12:16:30 +03:00
Joona Hoikkala d08f7a82dc Support print() as function in Python 2 2015-06-05 12:14:13 +03:00
Joona Hoikkala f19682cc80 Fixed (byte)string handling when calling base64 lib 2015-06-05 12:11:06 +03:00
Joona Hoikkala 1f833afa45 Initial run of 2to3 2015-06-05 12:07:28 +03:00
Faruk Sahin 8d4643c2e1 Add client credentials flow 2015-04-01 16:09:54 +02:00
Paul Lamere b455d529f0 Doc improvements for readthedocs 2014-08-22 11:48:12 -04:00
Paul Lamere 20870ea3ed Documentation improvements 2014-08-22 11:00:29 -04:00
Paul Lamere 080786654a Improved oauth docs 2014-08-22 09:23:06 -04:00
Paul Lamere 9a3b5784b0 Fixed refresh token problem 2014-08-21 07:35:01 -04:00
Paul Lamere 7601aaab58 refacord to support playlist editing 2014-08-20 14:08:49 -04:00
Matthew Duck 72d13dd0a7 Fix user having to login after first token refresh
Fix issue where the get_cached_token method returns None instead of the
cached token object, meaning that users have to login again when the
initial token expires. The problem has two aspects:

- The first time the user calls get_cached_token after token
  expiration, the token is refreshed but the "new_token_info" object is
  not returned.

- The second time the user calls get_cached_token after token
  expiration, the scope check fails, because the refresh_access_token
  method didn't include the "scope" key when it cached the new
  token_info results.
2014-08-04 16:17:21 +01:00
Paul Lamere 75a3779779 Don't use cached tokens when scope changes 2014-07-07 17:03:27 +02:00
Paul Lamere ceaa030468 Fixed album search test 2014-06-19 14:41:52 -04:00
Paul Lamere 539c9fb652 improved oauth examples 2014-05-23 07:19:16 -04:00
Paul Lamere 6ed7860b9d Added support for token caching and refresh 2014-05-20 08:30:48 -04:00
Paul Lamere 8dcaf7dba6 Repackaged for saner imports 2014-05-18 07:08:51 -04:00