requests-oauthlib
requests-oauthlib copied to clipboard
OAuth2Session refresh_token allow header specification
Hello, I was wondering if it would be possible to have custom headers when refreshing tokens with oauth2?
Specifically, OAuth2Session::refresh_token (oauth2_session.py line215 ) does not allow specifying of header. It does allow for specific body but not header, which might be required in some cases.
Thanks
Yes, that's an entirely reasonable request. Do you feel as though you could make a pull request to add that function?
My proposal is to add a refresh_kwargs param to request() for this purpose.
https://github.com/requests/requests-oauthlib/issues/264
It seems that this issue has been solved. In fact, the method refresh_token now has a header parameter.