WKNavigationDelegate の - webView:didReceiveAuthenticationChallenge:completionHandler: や、 NSURLSessionDelegate の URLSession:didReceiveChallenge:completionHandler: 、 そして NSURLConnectionDelegate の - connection:didReceiveAuthenticationChallenge: (Deprecated) の取り扱いを解説します。 認証の種類は NSURLProtectionSpace Authentication Methods に定義されているので、これらの定義が何を表すか、そして認証時にデリゲートではそれぞれどのような手続きが必要か調べました。