         @abstract Determine if the password for this protection space can be sent securely
         @result YES if a secure authentication method or protocol will be used, NO otherwise
     */
-    open var receivesCredentialSecurely: Bool { NSUnimplemented() }
+    open var receivesCredentialSecurely: Bool {
+        switch self.protocol {
+        // The documentation is ambiguous whether a protection space needs to use the NSURLProtectionSpace… constants, or URL schemes.
+        // Allow both.
+        case NSURLProtectionSpaceHTTPS: fallthrough
+        case "https": fallthrough
+        case "ftps":
+            return true
+            
+        default:
+            switch authenticationMethod {
+            case NSURLAuthenticationMethodDefault: fallthrough
+            case NSURLAuthenticationMethodHTTPBasic: fallthrough
+            case NSURLAuthenticationMethodHTTPDigest: fallthrough
+            case NSURLAuthenticationMethodHTMLForm:
+                return false
+                
+            case NSURLAuthenticationMethodNTLM: fallthrough
+            case NSURLAuthenticationMethodNegotiate: fallthrough
+            case NSURLAuthenticationMethodClientCertificate: fallthrough
+            case NSURLAuthenticationMethodServerTrust:
+                return true
+                
+            default:
+                return false
+            }
+        }
+    }
     
     /*!
         @method host

        return copy(with: nil)
    }
    
    open func copy(with zone: NSZone? = nil) -> Any { NSUnimplemented() }
    public static var supportsSecureCoding: Bool { return true }

    open func encode(with aCoder: NSCoder) {
        NSUnimplemented()
    }
    public required init?(coder aDecoder: NSCoder) {
        NSUnimplemented()
    }
    
    
    /*!
        @method initWithHost:port:protocol:realm:authenticationMethod:

    @class URLProtectionSpace
    @discussion This class represents a protection space requiring authentication.
*/
open class URLProtectionSpace : NSObject, NSCopying {

    private let _host: String
    private let _isProxy: Bool
