trivago / Heimdallr.swift

Easy to use OAuth 2 library for iOS, written in Swift.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for SSL connections using self-signed certificates

pk1 opened this issue · comments

commented

Hi,

since Apple introduced ATS (App Transport Security) normal HTTP connections are not allowed anymore. Of course you can bypass this as long as you're still in development mode and you don't need to publish your app on the app store. Same applies to connections you need to establish to servers using a self-signed SSL certificate.

The problem now is that as far as I can see Heimdallr is not able to use SSL connections with self-signed certificates on the server-side (at least during development there should be no need to pay money for an official SSL certificate). Is there any change to implement this feature in Heimdallr so connections to servers with a self-signed certificate can be used?

Thanks for all your work so far!!

Hi,

I would say you just have implement your own HTTPClient class, conforming to the HeimdallrHTTPClient protocol, give it to Heimdallrs initializer and you should be good to go.

If this does not work (or I missed something) please ping back here.
If it works: Please ping back here and feel free to post/gist your solution 😄