NSURLAuthenticationChallengeSender Protocol Reference

Conforms to
Framework
/System/Library/Frameworks/Foundation.framework
Availability
Available in iOS 2.0 and later.
Companion guide
Declared in
NSURLAuthenticationChallenge.h

Overview

The NSURLAuthenticationChallengeSender protocol represents the interface that the sender of an authentication challenge must implement.

The methods in the protocol are generally sent by a delegate in response to receiving a connection:didReceiveAuthenticationChallenge: or download:didReceiveAuthenticationChallenge:. The different methods provide different ways of responding to authentication challenges.

Tasks

Protocol Methods

Instance Methods

cancelAuthenticationChallenge:

Cancels a given authentication challenge. (required)

- (void)cancelAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
Parameters
challenge

The authentication challenge to cancel.

Availability
  • Available in iOS 2.0 and later.
Declared In
NSURLAuthenticationChallenge.h

continueWithoutCredentialForAuthenticationChallenge:

Attempt to continue downloading a request without providing a credential for a given challenge. (required)

- (void)continueWithoutCredentialForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
Parameters
challenge

A challenge without authentication credentials.

Discussion

This method has no effect if it is called with an authentication challenge that has already been handled.

Availability
  • Available in iOS 2.0 and later.
Declared In
NSURLAuthenticationChallenge.h

performDefaultHandlingForAuthenticationChallenge:

Causes the system-provided default behavior to be used.

- (void)performDefaultHandlingForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge;
Parameters
challenge

The challenge for which the default behavior should be used.

Availability
  • Available in iOS 5.0 and later.
Declared In
NSURLAuthenticationChallenge.h

rejectProtectionSpaceAndContinueWithChallenge:

Rejects the currently supplied protection space.

- (void)rejectProtectionSpaceAndContinueWithChallenge:(NSURLAuthenticationChallenge *)challenge;
Parameters
challenge

The challenge that should be rejected.

Availability
  • Available in iOS 5.0 and later.
Declared In
NSURLAuthenticationChallenge.h

useCredential:forAuthenticationChallenge:

Attempt to use a given credential for a given authentication challenge. (required)

- (void)useCredential:(NSURLCredential *)credential forAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
Parameters
credential

The credential to use for authentication.

challenge

The challenge for which to use credential.

Discussion

This method has no effect if it is called with an authentication challenge that has already been handled.

Availability
  • Available in iOS 2.0 and later.
Declared In
NSURLAuthenticationChallenge.h