openapi-python-client
openapi-python-client copied to clipboard
Support Client Side Certificates
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.
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.
Another case where #202 will solve the issue once we get to it.