<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AuthenticationServices",
  "identifier" : "/documentation/AuthenticationServices/ASImportableCredential",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Authentication Services"
    ],
    "preciseIdentifier" : "s:22AuthenticationServices22ASImportableCredentialO"
  },
  "title" : "ASImportableCredential"
}
-->

# ASImportableCredential

A credential for use in import and export.

```
enum ASImportableCredential
```

## Overview

A credential represents a piece of secure information associated with an item.
`ASImportableCredential` currently supports the following kinds of credentials:

- Password (`BasicAuthentication`)
- Passkey
- Time-based one-time password (TOTP)
- Note
- Credit card

This type is a representation of `Credential` as defined in the Credential Exchange Format (CXF) specification.
You can supply a JSON representation of a CXF `Credential` to initialize an instance of this struct by using a <doc://com.apple.documentation/documentation/Foundation/JSONDecoder> and calling <doc://com.apple.documentation/documentation/Foundation/JSONDecoder/decode(_:from:)>.

## Topics

### Login credential types

[`case basicAuthentication(ASImportableCredential.BasicAuthentication)`](/documentation/AuthenticationServices/ASImportableCredential/basicAuthentication(_:))

A password credential.

[`struct BasicAuthentication`](/documentation/AuthenticationServices/ASImportableCredential/BasicAuthentication)

A type to represent a basic authentication password.

[`case passkey(ASImportableCredential.Passkey)`](/documentation/AuthenticationServices/ASImportableCredential/passkey(_:))

A passkey credential.

[`struct Passkey`](/documentation/AuthenticationServices/ASImportableCredential/Passkey)

A type to represent a passkey credential.

[`case totp(ASImportableCredential.TOTP)`](/documentation/AuthenticationServices/ASImportableCredential/totp(_:))

A time-based one-time password (TOTP) credential.

[`struct TOTP`](/documentation/AuthenticationServices/ASImportableCredential/TOTP)

A type to represent a time-based one-time password generator (TOTP).

### Document credential types

[`case note(ASImportableCredential.Note)`](/documentation/AuthenticationServices/ASImportableCredential/note(_:))

A note credential.

[`struct Note`](/documentation/AuthenticationServices/ASImportableCredential/Note)

A piece of text used to store some information about an item.

### Identity credential types

[`case creditCard(ASImportableCredential.CreditCard)`](/documentation/AuthenticationServices/ASImportableCredential/creditCard(_:))

A credit card credential.

[`struct CreditCard`](/documentation/AuthenticationServices/ASImportableCredential/CreditCard)

A type to represent credit card information.

### Structures

[`struct APIKey`](/documentation/AuthenticationServices/ASImportableCredential/APIKey)

A representation of APIKey as defined in the [Credential Exchange Format (CXF) specs](https://fidoalliance.org/specs/cx/cxf-v1.0-rd-20250313.html)

[`struct Address`](/documentation/AuthenticationServices/ASImportableCredential/Address)

A representation of Address as defined in the [Credential Exchange Format (CXF) specs](https://fidoalliance.org/specs/cx/cxf-v1.0-rd-20250313.html)
This represents a physical address.

[`struct CustomFields`](/documentation/AuthenticationServices/ASImportableCredential/CustomFields)

A representation of CustomFields as defined in the [Credential Exchange Format (CXF) specs](https://fidoalliance.org/specs/cx/cxf-v1.0-rd-20250313.html)

[`struct DriversLicense`](/documentation/AuthenticationServices/ASImportableCredential/DriversLicense)

A representation of DriversLicense as defined in the [Credential Exchange Format (CXF) specs](https://fidoalliance.org/specs/cx/cxf-v1.0-rd-20250313.html)

[`struct GeneratedPassword`](/documentation/AuthenticationServices/ASImportableCredential/GeneratedPassword)

A representation of GeneratedPassword as defined in the [Credential Exchange Format (CXF) specs](https://fidoalliance.org/specs/cx/cxf-v1.0-rd-20250313.html)
This represents a machine-generated password.

[`struct IdentityDocument`](/documentation/AuthenticationServices/ASImportableCredential/IdentityDocument)

A representation of IdentityDocument as defined in the [Credential Exchange Format (CXF) specs](https://fidoalliance.org/specs/cx/cxf-v1.0-rd-20250313.html)
This represents any kind of document that can be used for identification.

[`struct ItemReference`](/documentation/AuthenticationServices/ASImportableCredential/ItemReference)

A representation of ItemReference as defined in the [CredentialExchange Format (CXF) specs](https://fidoalliance.org/specs/cx/cxf-v1.0-rd-20250313.html)
This is a pointer to another Item.

[`struct Passport`](/documentation/AuthenticationServices/ASImportableCredential/Passport)

A representation of Passport as defined in the [Credential Exchange Format (CXF) specs](https://fidoalliance.org/specs/cx/cxf-v1.0-rd-20250313.html)
This represents a passport document.

[`struct PersonName`](/documentation/AuthenticationServices/ASImportableCredential/PersonName)

A representation of PersonName as defined in the [Credential Exchange Format (CXF) specs](https://fidoalliance.org/specs/cx/cxf-v1.0-rd-20250313.html)
This represents a person’s name.

[`struct SSHKey`](/documentation/AuthenticationServices/ASImportableCredential/SSHKey)

A representation of SSHKey as defined in the [Credential Exchange Format (CXF) specs](https://fidoalliance.org/specs/cx/cxf-v1.0-rd-20250313.html)

[`struct WiFi`](/documentation/AuthenticationServices/ASImportableCredential/WiFi)

A representation of Wi-Fi Passphrase as defined in the [Credential Exchange Format (CXF) specs](https://fidoalliance.org/specs/cx/cxf-v1.0-rd-20250313.html)
This represents a credential for a WiFi network..

### Enumeration Cases

[`case address(ASImportableCredential.Address)`](/documentation/AuthenticationServices/ASImportableCredential/address(_:))

[`case apiKey(ASImportableCredential.APIKey)`](/documentation/AuthenticationServices/ASImportableCredential/apiKey(_:))

[`case customFields(ASImportableCredential.CustomFields)`](/documentation/AuthenticationServices/ASImportableCredential/customFields(_:))

[`case driversLicense(ASImportableCredential.DriversLicense)`](/documentation/AuthenticationServices/ASImportableCredential/driversLicense(_:))

[`case generatedPassword(ASImportableCredential.GeneratedPassword)`](/documentation/AuthenticationServices/ASImportableCredential/generatedPassword(_:))

[`case identityDocument(ASImportableCredential.IdentityDocument)`](/documentation/AuthenticationServices/ASImportableCredential/identityDocument(_:))

[`case itemReference(ASImportableCredential.ItemReference)`](/documentation/AuthenticationServices/ASImportableCredential/itemReference(_:))

[`case passport(ASImportableCredential.Passport)`](/documentation/AuthenticationServices/ASImportableCredential/passport(_:))

[`case personName(ASImportableCredential.PersonName)`](/documentation/AuthenticationServices/ASImportableCredential/personName(_:))

[`case sshKey(ASImportableCredential.SSHKey)`](/documentation/AuthenticationServices/ASImportableCredential/sshKey(_:))

[`case wifi(ASImportableCredential.WiFi)`](/documentation/AuthenticationServices/ASImportableCredential/wifi(_:))

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)