---
title: user
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/urlcredential/user
---

# user

The credential’s user name.

## Declaration

```swift
var user: String? { get }
```

## See Also

### Getting credential properties

- [certificates](foundation/urlcredential/certificates.md)
- [hasPassword](foundation/urlcredential/haspassword.md)
- [password](foundation/urlcredential/password.md)
- [identity](foundation/urlcredential/identity.md)
- [persistence](foundation/urlcredential/persistence-swift.property.md)
- [URLCredential.Persistence](foundation/urlcredential/persistence-swift.enum.md)
