client-sdk-swift icon indicating copy to clipboard operation
client-sdk-swift copied to clipboard

WebSocket class delegate extension

Open afgarcia86 opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe.

We would like to enable mutual TLS for our LiveKit connections.

Describe the solution you'd like A clear and concise description of what you want to happen.

We have been successfully able to do this for our API calls by setting the following URLSessionDelegate method:

func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge) async -> (URLSession.AuthChallengeDisposition, URLCredential?) {}

And handling the challenges ie inserting our certificates and verifying the servers certs.

My understanding is that the URLSessionWebSocketDelegate inherits the URLSessionDelegate so I believe if we are able to set that method on the Websocket class we will be able to do this.

Is that something that can be done today or is it a significant lift? I am newer to swift but I would be happy to work on a PR with some guidance.

afgarcia86 avatar Mar 08 '24 13:03 afgarcia86