When spotify redirects the browser to localhost, serve the page with a
simple http server implemented by HTTPServer. By this way, we can obtain
the tokens the oauth service want so provide us, and no need to input the
user the redirect URL.
This method only works when the application in spotify developer dashboard
is configured to redirect the requests to localhost.
To use this method it is required to specify the redirect_url pointing to
localhost with simple http, to a non-privilegized port (unless the script is
run as root).
* test_improvements - Add __init__.py files to tests dirs so you can run all tests
* test_improvements - added helpers file, restructured tests to work without previous data and to be grouped with api type
* http_retries - Implement Retry for all requests
* Readme - Update README with contributing info
* PR Feedback - Added CONTRIBUTING.md, fixed README, fixed test
which show up when fetching access token using:
```python
credentials = oauth2.SpotifyClientCredentials(
client_id=client_id,
client_secret=client_secret,
)
token = credentials.get_access_token()
```
* Auto-refresh AuthCode flow token.
* Reformatted.
* Reformatted.
* Removed invalid syntax.
* Removed abstract class SpotifyAuthManager.
* Fix typo on docstrings.
* Optionally try to fetch main input parameters from environment.
Implements the capability of trying to fetch the following parameters from the environment, when they're not directly passed to the authorization handler.
The affected parameters are: client_id, client_secret, redirect_uri.
An SpotifyOauthError is raised if no value gets found.
* Removed f-string for Python2 compatibility.
* Fix line-too-long.
* Remove useless import.
* Add username to docstring.
* Remove redundant return.
* Fix empty lines print statement for backward compatibility with Python2.
* Update simple4 example.
* Set optional 'as_dict' parameter on OAuth 'get_access_token'.
* Update changelog.
Co-authored-by: Stéphane Bruckert <stephane.bruckert@gmail.com>
* Linting of OAuth2 mod. + update tests to detect core package path
* Tweak imports in tests + update tox ini to ignore Flake8 E501 error
* Tweak tox ini - ignore examples
* Remove `f`-string from OAuth2 mod.
* More import tweaks in core package + tests
* Update flake8 config. in tox ini - set line length limit to 99 chars.