<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AuthenticationServices",
  "identifier" : "/documentation/AuthenticationServices/ASPasswordCredential",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Authentication Services"
    ],
    "preciseIdentifier" : "c:objc(cs)ASPasswordCredential"
  },
  "title" : "ASPasswordCredential"
}
-->

# ASPasswordCredential

A password credential.

```
class ASPasswordCredential
```

## Topics

### Creating a credential

[`credentialWithUser:password:`](/documentation/AuthenticationServices/ASPasswordCredential/credentialWithUser:password:)

Creates a password credential instance with a given user name and password.

[`init(user:password:)`](/documentation/AuthenticationServices/ASPasswordCredential/init(user:password:))

Initializes a password credential.

### Accessing the username and password

[`user`](/documentation/AuthenticationServices/ASPasswordCredential/user)

The user for a password credential object.

[`password`](/documentation/AuthenticationServices/ASPasswordCredential/password)

The password for a password credential object.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)