Skip to content
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

Allows tokens to be refreshed via a proxy #235

Merged
merged 1 commit into from
May 11, 2016
Merged

Conversation

cmoman
Copy link

@cmoman cmoman commented May 11, 2016

Hi.
I was using your library to access a webbased API via a proxy server. The proxy requires authentication. I found I couldn't refresh the token without adding the proxies parameter to the QAuth2Session class.
I have no idea if this raises other security issues but it works for my useage. I thought I'd see if was useful in the general sense by creating this pull request.
Thanks,
Chris

@Lukasa
Copy link
Member

Lukasa commented May 11, 2016

I think this change is entirely reasonable. =) Of course, you could have just set the proxies on the session itself (sess.proxies = proxy_dict), but there's nothing wrong with doing this as well.

@Lukasa Lukasa merged commit 44d6576 into requests:master May 11, 2016
@cmoman
Copy link
Author

cmoman commented May 11, 2016

Thanks for the comment about setting the session proxy. I hadn't thought to do this.
However, I reverted my changes and tried your suggestion(sess.proxies = proxy_dict) but it didn't seem to work. Although the value self.proxies was set in the session class, this didn't seem to translate across into the .refresh_token() method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants