AuthenticationChallengeResponsable
public protocol AuthenticationChallengeResponsable: class
Protocol indicates that an authentication challenge could be handled.
-
Called when an session level authentication challenge is received. This method provide a chance to handle and response to the authentication challenge before downloading could start.
Note
This method is a forward from
URLSessionDelegate.urlSession(:didReceiveChallenge:completionHandler:). Please refer to the document of it inURLSessionDelegate.Declaration
Swift
func downloader(_ downloader: ImageDownloader, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void)Parameters
downloaderThe downloader which receives this challenge.
challengeAn object that contains the request for authentication.
completionHandlerA handler that your delegate method must call.
-
Called when an session level authentication challenge is received. This method provide a chance to handle and response to the authentication challenge before downloading could start.
Note
This method is a forward from
URLSessionTaskDelegate.urlSession(:task:didReceiveChallenge:completionHandler:). Please refer to the document of it inURLSessionTaskDelegate.Declaration
Swift
func downloader(_ downloader: ImageDownloader, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void)Parameters
downloaderThe downloader which receives this challenge.
taskThe task whose request requires authentication.
challengeAn object that contains the request for authentication.
completionHandlerA handler that your delegate method must call.
View on GitHub
Install in Dash
AuthenticationChallengeResponsable Protocol Reference