Alamofire не может получить NSURLAuthenticationMethodClientCertificate для сертификации клиента - PullRequest
0 голосов
/ 17 октября 2018

Я использую Alamofire (4.7.3), Xcode 10 (Swift4.2).И я использую эти коды для взаимной аутентификации

manager.delegate.sessionDidReceiveChallenge = { (session,challenge) in
    if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust {
            // it's ok
    }
    else if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodClientCertificate {
           // can't receive NSURLAuthenticationMethodClientCertificate
    }
)
...