requests-oauthlib icon indicating copy to clipboard operation
requests-oauthlib copied to clipboard

OAuth2Session refresh_token allow header specification

Open randi120 opened this issue 10 years ago • 3 comments

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

randi120 avatar May 26 '15 19:05 randi120

Yes, that's an entirely reasonable request. Do you feel as though you could make a pull request to add that function?

Lukasa avatar May 26 '15 19:05 Lukasa

My proposal is to add a refresh_kwargs param to request() for this purpose.

https://github.com/requests/requests-oauthlib/issues/264

btimby avatar Mar 03 '17 14:03 btimby

It seems that this issue has been solved. In fact, the method refresh_token now has a header parameter.

nbro10 avatar Jul 28 '22 20:07 nbro10