---
title: allCredentials
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/urlcredentialstorage/allcredentials
---

# allCredentials

The credentials for all available protection spaces.

## Declaration

```swift
var allCredentials: [URLProtectionSpace : [String : URLCredential]] { get }
```

## Discussion

Discussion The dictionary has keys corresponding to the URLProtectionSpace instances. The values are dictionaries where the keys are user name strings, and each value is the corresponding URLCredential instances.

## See Also

### Retrieving credentials

- [credentials(for:)](foundation/urlcredentialstorage/credentials(for:).md)
- [getCredentials(for:task:completionHandler:)](foundation/urlcredentialstorage/getcredentials(for:task:completionhandler:).md)
