title: FIDOPublicKeyCredentialAttestation
type: object
description: |
  A data model representing a FIDO Attestation result. Derived from
  [`PublicKeyCredential` Interface](https://w3c.github.io/webauthn/#iface-pkcredential).

  The `PublicKeyCredential` interface represents the below fields with
  a Type of Javascript [ArrayBuffer](https://heycam.github.io/webidl/#idl-ArrayBuffer).
  For this API, we represent ArrayBuffers as base64 encoded utf-8 strings.
properties:
  id:
    type: string
    description: |
      credential id: identifier of pair of keys, base64 encoded
      https://w3c.github.io/webauthn/#ref-for-dom-credential-id
    minLength: 20
    maxLength: 118
  rawId:
    type: string
    description: |
      raw credential id: identifier of pair of keys, base64 encoded
    minLength: 20
    maxLength: 118
  response:
    type: object
    description: |
      AuthenticatorAttestationResponse
    properties:
      clientDataJSON:
        type: string
        description: |
          JSON string with client data
        minLength: 121
        maxLength: 512
      attestationObject:
        type: string
        description: |
          CBOR.encoded attestation object
        minLength: 306
        maxLength: 2048
    required:
      - clientDataJSON
      - attestationObject
    additionalProperties: false
  type:
    type: string
    description: response type, we need only the type of public-key
    enum:
      - 'public-key'
required:
  - id
  - response
  - type
additionalProperties: false
