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

Support Client Side Certificates #621

Closed
marioland opened this issue Jun 1, 2022 · 2 comments
Closed

Support Client Side Certificates #621

marioland opened this issue Jun 1, 2022 · 2 comments
Labels
✨ enhancement New feature or improvement

Comments

@marioland
Copy link

It would be nice if the generated client would support client side certificates.
This would be an additional authentication method used in secured environments.
The underlaying httpx lib does support it with a named argument "cert":
https://www.python-httpx.org/advanced/#client-side-certificates

I was not able to get the kwargs from the openapi-python-client passed through to httpx.

@marioland marioland added the ✨ enhancement New feature or improvement label Jun 1, 2022
@bakkiaraj
Copy link

I believe, Client side certificate is already available. I use it following way,

 ssl_certificate: str = str(Path(__file__).parent.joinpath("client_Certificates.pem").resolve())
  
   rest_client = Client(
        base_url=v3_rest_uri,
        headers=basic_auth_header,
        timeout=60,
        verify_ssl=ssl_certificate
    )

Then use the client while calling any REST API.

@dbanty
Copy link
Collaborator

dbanty commented Nov 12, 2022

Another case where #202 will solve the issue once we get to it.

@dbanty dbanty closed this as completed Nov 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or improvement
Projects
None yet
Development

No branches or pull requests

3 participants