{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/daon/main/json-schema/daon-user-passkey-schema.json",
  "title": "UserPasskey",
  "description": "A passkey which is registered to a user.",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/daon-trustx-openapi.yml#/components/schemas/UserPasskey",
  "type": "object",
  "properties": {
    "permittedOperations": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "createdDtm": {
      "type": "string",
      "format": "date-time"
    },
    "lastUpdatedDtm": {
      "type": "string",
      "format": "date-time"
    },
    "id": {
      "type": "string",
      "description": "Unique 26-character database user ID."
    },
    "storeId": {
      "type": "string",
      "description": "Unique 26-character database store ID."
    },
    "userId": {
      "type": "string",
      "description": "Unique 26-character database user ID."
    },
    "relyingPartyId": {
      "type": "string",
      "description": "The relying party ID."
    },
    "regPolicyName": {
      "type": "string",
      "description": "The relying party's registration policy name."
    },
    "credentialId": {
      "type": "string",
      "description": "The ID of the passkey credential generated by the client authenticator."
    },
    "aaguid": {
      "type": "string",
      "description": "A unique identifier of the passkey type."
    },
    "status": {
      "type": "string",
      "description": "The passkey status: ACTIVE or DISABLED.",
      "enum": [
        "ACTIVE",
        "DISABLED"
      ]
    },
    "algorithm": {
      "type": "string",
      "description": "The passkey signing algorithm",
      "enum": [
        "RS1",
        "RS256",
        "RS384",
        "RS512",
        "PS256",
        "PS384",
        "PS512",
        "EDDSA",
        "ES256",
        "ES384",
        "ES512",
        "ES256K"
      ]
    },
    "signCounter": {
      "type": "integer",
      "format": "int64",
      "description": "The passkey signature counter. How many authentications have been performed by the authenticator."
    },
    "residentKey": {
      "type": "boolean",
      "description": "Whether this is a *resident key* meaning a key which is discoverable by the client without a user ID being provided."
    },
    "attestationType": {
      "type": "string",
      "description": "The passkey attestation type",
      "enum": [
        "BASIC",
        "SELF",
        "ATTESTATION_CA",
        "ANON_CA",
        "NONE"
      ]
    },
    "backupEligible": {
      "type": "boolean",
      "description": "Whether this key can be backed up."
    },
    "backupState": {
      "type": "boolean",
      "description": "Whether this key is a back-up."
    },
    "transports": {
      "type": "array",
      "description": "A list of communication mechanisms with the client impemented by an authenticator.",
      "items": {
        "type": "string",
        "enum": [
          "usb",
          "nfc",
          "ble",
          "hybrid",
          "internal"
        ]
      }
    },
    "credProtect": {
      "type": "integer",
      "format": "int32",
      "description": "The protection level of the passkey."
    },
    "internalId": {
      "type": "string"
    },
    "publicKey": {
      "type": "object",
      "description": "The public key associated with the authenticator. Used to verify authenticator assertions.",
      "properties": {
        "params": {
          "type": "object"
        },
        "algorithm": {
          "type": "string"
        },
        "format": {
          "type": "string"
        },
        "encoded": {
          "type": "string",
          "format": "byte"
        }
      }
    },
    "friendlyName": {
      "type": "string",
      "description": "Passkey friendly name."
    },
    "os": {
      "type": "string",
      "description": "User agent operating system."
    },
    "osVersion": {
      "type": "string"
    },
    "userAgentName": {
      "type": "string",
      "description": "User agent name, for example Chrome."
    },
    "userAgentVersion": {
      "type": "string",
      "description": "User agent version."
    },
    "deviceMake": {
      "type": "string"
    },
    "deviceModel": {
      "type": "string"
    },
    "lastUsedDtm": {
      "type": "string",
      "format": "date-time",
      "description": "If the key has been used for authentication this field indicates the last time this occurred"
    }
  },
  "required": [
    "algorithm",
    "attestationType",
    "credentialId",
    "id",
    "publicKey",
    "regPolicyName",
    "relyingPartyId",
    "signCounter",
    "status",
    "storeId",
    "userId"
  ]
}