{ "$schema":                  "https://json-schema.org/draft/2020-12/schema",
  "$id":                      "https://schemas.mpai.community/MMM4/V2.2/data/Authentication.json",
  "title":                    "Authentication V2.2",
  "type":                     "object",
  "properties":               {

    "Header":                 { "type": "string", "pattern": "^MMM-AUT-V[0-9],{1,2},[.][0-9],{1,2}$" },
    "MInstanceID":            { "type": "string" },
    "UEnvironment":           { "type": "string" },
    "AuthenticationID":       { "type": "string" },
    "AuthenticationTime":     { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/Time.json"},

    "AuthenticationRequest":  { "type": "object", "properties": {
      "MLocation":            { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/LocationObject.json" },
      "PerceptibleEntity":    { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/PerceptibleEntity.json" },
      "ClaimedIdentity":      { "type": "string" } } },

    "AuthenticationResponse": { "type": "object", "properties": {
      "AnyItem":              { "$ref": "https://schemas.mpai.community/MMM4/V2.2/data/AnyItem.json" },
      "Confidence":           { "type": "number" } } },

    "DataXMData":             { "$ref": "https://schemas.mpai.community/PTF/V1.0/data/DataExchangeMetadata.json" },
    "DescrMetadata":          { "type": "string", "maxLength": 2048 } },

  "oneOf": [                  { "required": [ "AuthenticationRequest" ], "not": { "required": [ "AuthenticationResponse" ] } },
                              { "required": [ "AuthenticationResponse" ], "not": { "required": [ "AuthenticationRequest" ] } } ] }
