-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
Some HTTP APIs require mutual TLS (mTLS) for authentication, where the client presents a certificate and private key during the TLS handshake. This is the equivalent of curl's --cert and --key flags:
$ curl -X GET https://api.example.com/resource \
--cert certificate.pem \
--key private_key.pemCurrently, Configuration only exposes verify_tls, timeout, and follow_redirects. There is no way to pass a client certificate and key to the underlying Erlang ssl module.
One approach would be individual builder functions on Configuration, consistent with the existing style:
httpc.configure()
|> httpc.client_certificate(certfile: "certificate.pem", keyfile: "private_key.pem")
|> httpc.dispatch(request)Would you consider this as a valid feature request?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels