Skip to content

PyJWKClient: Support for proxy in fetch_data() #1031

Open
@PeterRistMHP

Description

@PeterRistMHP

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions