<!--
{
  "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.

[`-  initWithUser: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.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`ASAuthorizationCredential`](/documentation/AuthenticationServices/ASAuthorizationCredential)

[`CVarArg`](/documentation/Swift/CVarArg)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)