Instance Method


Sent to determine whether the delegate is able to respond to a protection space’s form of authentication.


- (BOOL)download:(NSURLDownload *)connection canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace;



The download sending the message.


The protection space that generates an authentication challenge.


This method is called before download:didReceiveAuthenticationChallenge:, allowing the delegate to inspect a protection space before attempting to authenticate against it. By returning YES, the delegate indicates that it can handle the form of authentication, which it does in the subsequent call to download:didReceiveAuthenticationChallenge:. Not implementing this method is the same as returning NO, in which case default authentication handling is used.

See Also

Download Authentication

- download:didCancelAuthenticationChallenge:

Sent if an authentication challenge is canceled due to the protocol implementation encountering an error.

- download:didReceiveAuthenticationChallenge:

Sent when the URL download must authenticate a challenge in order to download the request.

- downloadShouldUseCredentialStorage:

Sent to determine whether the URL loader should consult the credential storage to authenticate the download.