NSURLProtectionSpace Authentication Method Constants

Constants describing known values of the authenticationMethod property of a URLProtectionSpace.

Overview

These constants are also used with the URLProtectionSpace initializers init(host:port:protocol:realm:authenticationMethod:) and init(proxyHost:port:type:realm:authenticationMethod:).

Topics

Session-Wide Authentication Challenges

These constants indicate session-wide challenges. Delegates handle these challenges in the URLSessionDelegate method urlSession(_:didReceive:completionHandler:).

let NSURLAuthenticationMethodClientCertificate: String

Use client certificate authentication for this protection space.

let NSURLAuthenticationMethodNegotiate: String

Negotiate whether to use Kerberos or NTLM authentication for this protection space.

let NSURLAuthenticationMethodNTLM: String

Use NTLM authentication for this protection space.

let NSURLAuthenticationMethodServerTrust: String

Perform server trust authentication (certificate validation) for this protection space.

Task-Specific Authentication Challenges

These constants indicate task-specific challenges. Delegates handle these challenges in the URLSessionTaskDelegate method urlSession(_:task:didReceive:completionHandler:).

let NSURLAuthenticationMethodDefault: String

Use the default authentication method for a protocol.

let NSURLAuthenticationMethodHTMLForm: String

Use HTML form authentication for this protection space.

let NSURLAuthenticationMethodHTTPBasic: String

Use HTTP basic authentication for this protection space.

let NSURLAuthenticationMethodHTTPDigest: String

Use HTTP digest authentication for this protection space.

See Also

Identifying Protection Space Properties

NSURLProtectionSpace Protocol Types

These constants describe the supported protocols for a protection space, as returned by protocol.

NSURLProtectionSpace Proxy Types

These constants describe the supported proxy types used in init(proxyHost:port:type:realm:authenticationMethod:) and returned by proxyType.