---
title: URLAuthenticationChallengeSender
framework: foundation
role: symbol
role_heading: Protocol
path: foundation/urlauthenticationchallengesender
---

# URLAuthenticationChallengeSender

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

## Declaration

```swift
protocol URLAuthenticationChallengeSender : NSObjectProtocol, Sendable
```

## Overview

Overview The methods in the protocol are generally sent by a delegate in response to receiving a connection(_:didReceive:): or download(_:didReceive:):. The different methods provide different ways of responding to authentication challenges. important: This protocol is only for use with the legacy NSURLConnection and NSURLDownload classes. It should not be used with URLSession-based code, for which you respond to authentication challenges by passing URLSession.AuthChallengeDisposition constants to the provided completion handler blocks.

## Topics

### Protocol Methods

- [cancel(_:)](foundation/urlauthenticationchallengesender/cancel(_:).md)
- [continueWithoutCredential(for:)](foundation/urlauthenticationchallengesender/continuewithoutcredential(for:).md)
- [use(_:for:)](foundation/urlauthenticationchallengesender/use(_:for:).md)
- [performDefaultHandling(for:)](foundation/urlauthenticationchallengesender/performdefaulthandling(for:).md)
- [rejectProtectionSpaceAndContinue(with:)](foundation/urlauthenticationchallengesender/rejectprotectionspaceandcontinue(with:).md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
