---
title: "init(user:password:)"
framework: authenticationservices
role: symbol
role_heading: Initializer
path: "authenticationservices/aspasswordcredential/init(user:password:)"
---

# init(user:password:)

Initializes a password credential.

## Declaration

```swift
init(user: String, password: String)
```

## Parameters

- `user`: The username associated with the credential.
- `password`: The password associated with the credential.
