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

Enable caller provide customized request session for authentication request. #275

Open
shileiyu opened this issue Jun 29, 2018 · 1 comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@shileiyu
Copy link

shileiyu commented Jun 29, 2018

Hardcode a new session dedicated for authentication request make the user hard to customize the requests session object. (for example, proxy)

https://github.com/GoogleCloudPlatform/google-auth-library-python/blob/edfe24602051969e32917e82bcedd2bace43e260/google/auth/transport/requests.py#L167

@theacodes theacodes added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Jun 29, 2018
@brianbao
Copy link
Contributor

@theacodes I ran into this issue when working with a proxy and can send a fix, but I wasn't sure how to provide the correct fix.

We could stay consistent with what urllib3.py does and allow a Session object to be passed through to __init__ and use that as self._auth_request. We can then just default to the original base Session object.

As an aside, the requests.Session object doesn't allow kwargs, so I'm not sure if we want to allow that or if we do, then we can also consider propagating kwargs into self and auth_request_session.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

3 participants