Instance Property


The sender of the challenge.


var sender: URLAuthenticationChallengeSender? { get }


If you are using the URLSession API, this value is purely informational, because you must respond to authentication challenges in your URLSessionDelegate or URLSessionTaskDelegate implementations, by passing URLSession.AuthChallengeDisposition constants to the provided completion handler blocks.

However, if you are using the legacy NSURLConnection or NSURLDownload API, you use this object directly in your authentication handler delegate method. With these APIs, after you finish processing the authentication challenge, you respond by calling methods defined in the URLAuthenticationChallengeSender protocol on this sender.