{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://fdc3.finos.org/schemas/next/bridging/connectionStep4AuthenticationFailed.schema.json",
  "title": "ConnectionStep4AuthenticationFailed",
  "type": "object",
  "allOf": [
    {
      "$ref": "#/$defs/ConnectionStep4AuthenticationFailedBase"
    },
    {
      "$ref": "connectionStep.schema.json"
    }
  ],
  "$defs": {
    "ConnectionStep4AuthenticationFailedBase": {
      "type":"object",
      "title": "ConnectionStep4AuthenticationFailed",
      "description": "Message sent by Bridge to Desktop Agent if their authentication fails.",
      "properties": {
        "type": {
          "title": "Connection Step 4 Message Type",
          "const": "authenticationFailed"
        },
        "payload": {
          "title": "Connection Step 4 Payload",
          "type": "object",
          "properties": {
            "message": {
              "title": "Authentication failed message",
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "meta": {
          "title": "Connection Step 4 Metadata",
          "type": "object",
          "properties": {
            "requestUuid": {
              "$ref": "../api/common.schema.json#/$defs/RequestUuid"
            },
            "responseUuid": {
              "$ref": "../api/common.schema.json#/$defs/ResponseUuid"
            },
            "timestamp": {
              "$ref": "../api/common.schema.json#/$defs/Timestamp"
            }
          },
          "additionalProperties": false,
          "required": ["requestUuid", "responseUuid", "timestamp"]
        }
      },
      "required": ["type", "meta"],
      "additionalProperties": false
    }
  }
}