-
-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OAuth2Session
: Provide a default token_updater
that just replaces self.token
#411
Comments
token_updater
that just replaces token_updater
that just replaces self.token
token_updater
that just replaces self.token
OAuth2Session
: Provide a default token_updater
that just replaces self.token
I think a default updater would be beneficial. I think you'll also need to set access_token. Maybe something like this within the OAuth2Session class:
|
I think the issue is that client updates only happen if there is a token updater set (see https://github.com/requests/requests-oauthlib/blob/master/requests_oauthlib/oauth2_session.py#L537). If we move the |
To make the auto-refresh procedure work with our oauth2 server I discovered that I had to create the
token_updater
function myself, and that it was this very simple one-liner:Am I right to think that the last three lines of code could be done automatically by default ?
If so I can propose a PR
The text was updated successfully, but these errors were encountered: