Sfoglia il codice sorgente

Enable Client Certificate Support (#2993)

Add the `NSURLAuthenticationMethodClientCertificate` to the switch, just like the `NSURLAuthenticationMethodNTLM` and the `NSURLAuthenticationMethodNegotiate`.
刘富东 6 anni fa
parent
commit
80d379bea0
1 ha cambiato i file con 1 aggiunte e 3 eliminazioni
  1. 1 3
      Source/SessionDelegate.swift

+ 1 - 3
Source/SessionDelegate.swift

@@ -79,10 +79,8 @@ extension SessionDelegate: URLSessionTaskDelegate {
         switch challenge.protectionSpace.authenticationMethod {
         case NSURLAuthenticationMethodServerTrust:
             evaluation = attemptServerTrustAuthentication(with: challenge)
-        case NSURLAuthenticationMethodHTTPBasic, NSURLAuthenticationMethodHTTPDigest, NSURLAuthenticationMethodNTLM, NSURLAuthenticationMethodNegotiate:
+        case NSURLAuthenticationMethodHTTPBasic, NSURLAuthenticationMethodHTTPDigest, NSURLAuthenticationMethodNTLM, NSURLAuthenticationMethodNegotiate, NSURLAuthenticationMethodClientCertificate:
             evaluation = attemptCredentialAuthentication(for: challenge, belongingTo: task)
-        // case NSURLAuthenticationMethodClientCertificate:
-        // Alamofire doesn't currently support client certificate validation.
         default:
             evaluation = (.performDefaultHandling, nil, nil)
         }