HACertificateProvider
public protocol HACertificateProvider
Protocol for providing certificate authentication for HAKit REST API calls
-
Called when the server requests a client certificate (mTLS)
Declaration
Swift
func provideClientCertificate( for challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void )Parameters
challengeThe authentication challenge
completionHandlerHandler to call with the authentication result
-
Called when the server’s SSL certificate needs validation
Declaration
Swift
func evaluateServerTrust( _ serverTrust: SecTrust, forHost host: String, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void )Parameters
serverTrustThe server trust to evaluate
hostThe hostname being connected to
completionHandlerHandler to call with the validation result
View on GitHub