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

PyJWKClient: Support for proxy in fetch_data() #1031

Open
PeterRistMHP opened this issue Jan 17, 2025 · 0 comments
Open

PyJWKClient: Support for proxy in fetch_data() #1031

PeterRistMHP opened this issue Jan 17, 2025 · 0 comments

Comments

@PeterRistMHP
Copy link

PeterRistMHP commented Jan 17, 2025

Hi,

PyJWKClient currently doesn't support the usage of proxies when using get_signing_key_from_jwt() and then fetch_data():

r = urllib.request.Request(url=self.uri, headers=self.headers)
            with urllib.request.urlopen(
                r, timeout=self.timeout, context=self.ssl_context
            ) as response:
....

I would like to initialize the PyJWKClient with a proxy URI and set it on the Request in the fetch_data()

if self.proxy_host:
    r.set_proxy(self.proxy_host, 'https') 

I haven't found anything in the closed issues or the discussions yet, and was wondering if nobody needed a proxy - or there is a different option I'm not aware right now.

Thank you.

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

No branches or pull requests

1 participant