<!--
{
  "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/Passkey",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Authentication Services"
    ],
    "preciseIdentifier" : "s:22AuthenticationServices22ASImportableCredentialO7PasskeyV"
  },
  "title" : "ASImportableCredential.Passkey"
}
-->

# ASImportableCredential.Passkey

A type to represent a passkey credential.

```
struct Passkey
```

## Overview

This type is a representation of `Passkey` as defined in the Credential Exchange Format (CXF) specification.

## Topics

### Creating a passkey instance

[`init(credentialID: Data, relyingPartyIdentifier: String, userName: String, userDisplayName: String, userHandle: Data, key: Data)`](/documentation/AuthenticationServices/ASImportableCredential/Passkey/init(credentialID:relyingPartyIdentifier:userName:userDisplayName:userHandle:key:))

Creates a passkey instance.

### Accessing passkey properties

[`var credentialID: Data`](/documentation/AuthenticationServices/ASImportableCredential/Passkey/credentialID)

The credential ID associated with this passkey.

[`var relyingPartyIdentifier: String`](/documentation/AuthenticationServices/ASImportableCredential/Passkey/relyingPartyIdentifier)

The relying party identifier associated with the passkey.

[`var userName: String`](/documentation/AuthenticationServices/ASImportableCredential/Passkey/userName)

The username associated with the passkey.

[`var userDisplayName: String`](/documentation/AuthenticationServices/ASImportableCredential/Passkey/userDisplayName)

The human-readable name associated with the passkey.

[`var userHandle: Data`](/documentation/AuthenticationServices/ASImportableCredential/Passkey/userHandle)

The user handle associated with the passkey.

[`var key: Data`](/documentation/AuthenticationServices/ASImportableCredential/Passkey/key)

The private key associated with this passkey.

### Initializers

[`init(credentialID: Data, relyingPartyIdentifier: String, userName: String, userDisplayName: String, userHandle: Data, key: Data, fido2Extensions: ASImportableFIDO2Extensions?)`](/documentation/AuthenticationServices/ASImportableCredential/Passkey/init(credentialID:relyingPartyIdentifier:userName:userDisplayName:userHandle:key:fido2Extensions:))

### Instance Properties

[`var fido2Extensions: ASImportableFIDO2Extensions?`](/documentation/AuthenticationServices/ASImportableCredential/Passkey/fido2Extensions)

The FIDO2 extensions associated with this passkey.

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)