---
title: protectionSpace
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/urlauthenticationchallenge/protectionspace
---

# protectionSpace

The receiver’s protection space.

## Declaration

```swift
@NSCopying var protectionSpace: URLProtectionSpace { get }
```

## Mentioned in

Performing manual server trust authentication

## Discussion

Discussion A protection space object provides additional information about the authentication request, such as the host, port, authentication realm, and so on. The protection space also tells you whether the authentication challenge is asking you to provide the user’s credentials or to verify the TLS credentials provided by the server.
