{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.sectigoaxiom.com/contract/schemas/AuthorizeRequest.json",
  "type": "object",
  "properties": {
    "agent": {
      "type": "object",
      "properties": {
        "authorization": { "type": "string", "description": "The agent's Authorization header, e.g. `DPoP axa_…`" },
        "dpop": { "type": "string", "description": "The agent's DPoP proof header" },
        "htm": { "type": "string", "description": "HTTP method the provider received" },
        "htu": { "type": "string", "format": "uri", "description": "Full URL the provider received" }
      },
      "required": ["authorization", "dpop", "htm", "htu"]
    },
    "action": {
      "type": "object",
      "properties": {
        "operation_key": {
          "type": "string",
          "minLength": 8,
          "maxLength": 200,
          "description": "Client-provided idempotency key, stable across retries"
        },
        "operation": { "type": "string", "minLength": 1, "maxLength": 128 },
        "service": { "type": "string", "minLength": 1 },
        "tenant": { "type": "string", "minLength": 1 },
        "resource": {
          "type": "object",
          "properties": {
            "type": { "type": "string", "minLength": 1, "maxLength": 64 },
            "id": { "type": "string", "minLength": 1, "maxLength": 256 }
          },
          "required": ["type", "id"]
        },
        "params": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "$ref": "Json.json" } },
        "not_after": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "parent_action_id": { "type": "string" },
        "intent": { "type": "string", "maxLength": 500 }
      },
      "required": ["operation_key", "operation", "service", "tenant", "resource", "params"]
    }
  },
  "required": ["agent", "action"]
}
