Instance Method

use(_:for:)

Attempt to use a given credential for a given authentication challenge.

Required.

Declaration

func use(_ credential: URLCredential, for challenge: URLAuthenticationChallenge)

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.

See Also

Protocol Methods

func cancel(URLAuthenticationChallenge)

Cancels a given authentication challenge.

Required.

func continueWithoutCredential(for: URLAuthenticationChallenge)

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

Required.

func performDefaultHandling(for: URLAuthenticationChallenge)

Causes the system-provided default behavior to be used.

func rejectProtectionSpaceAndContinue(with: URLAuthenticationChallenge)

Rejects the currently supplied protection space.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software