title: FIDOPublicKeyCredentialAssertion
type: object
description: |
  A data model representing a FIDO Assertion result.
  Derived from PublicKeyCredential Interface in WebAuthN.

  The PublicKeyCredential interface represents the below fields with a Type of
  Javascript ArrayBuffer.
  For this API, we represent ArrayBuffers as base64 encoded utf-8 strings.

  https://github.com/mojaloop/documentation/blob/main/website/versioned_docs/v1.0.1/api/thirdparty/data-models.md#32128-fidopublickeycredentialassertion
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: |
      AuthenticatorAssertionResponse
    properties:
      authenticatorData:
        type: string
        description: |
          Authenticator data object.
        minLength: 49
        maxLength: 256
      clientDataJSON:
        type: string
        description: |
          JSON string with client data.
        minLength: 121
        maxLength: 512
      signature:
        type: string
        description: |
          The signature generated by the private key associated with this credential.
        minLength: 59
        maxLength: 256
      userHandle:
        type: string
        description: |
          This field is optionally provided by the authenticator, and
          represents the user.id that was supplied during registration.
        minLength: 1
        maxLength: 88
    required:
      - authenticatorData
      - clientDataJSON
      - signature
    additionalProperties: false
  type:
    type: string
    description: response type, we need only the type of public-key
    enum:
      - 'public-key'
required:
  - id
  - rawId
  - response
  - type
additionalProperties: false
