{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "autonym_token_kind": {
      "type": "string",
      "const": "lifecycle"
    },
    "iss": {
      "type": "string",
      "maxLength": 2048,
      "pattern": "^https:\\/\\/[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*(?::(?:6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{0,3}))?(?:\\/[\\x21\\x22\\x24-\\x2e\\x30-\\x3e\\x40-\\x5b\\x5d-\\x7e]*)*(?![\\s\\S])"
    },
    "aud": {
      "type": "string",
      "maxLength": 2048,
      "pattern": "^https:\\/\\/[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*(?::(?:6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{0,3}))?(?:\\/[\\x21\\x22\\x24-\\x2e\\x30-\\x3e\\x40-\\x5b\\x5d-\\x7e]*)*(?![\\s\\S])"
    },
    "sub": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^cl_[0-7][0-9A-HJKMNP-TV-Z]{25}(?![\\s\\S])"
        },
        {
          "type": "string",
          "maxLength": 2048,
          "pattern": "^https:\\/\\/(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*(?!(?:[0-9]+|0x[0-9a-f]*)(?![a-z0-9-]))[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?::(?:6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{0,3}))?(?:\\/(?!(?:\\.|%2[eE]){1,2}(?:[/?]|(?![\\s\\S])))[\\x21\\x22\\x24-\\x2e\\x30-\\x3e\\x40-\\x5b\\x5d-\\x7e]*)+(?:\\?[\\x21\\x22\\x24-\\x5b\\x5d-\\x7e]*)?(?![\\s\\S])"
        }
      ]
    },
    "client_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^cl_[0-7][0-9A-HJKMNP-TV-Z]{25}(?![\\s\\S])"
        },
        {
          "type": "string",
          "maxLength": 2048,
          "pattern": "^https:\\/\\/(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*(?!(?:[0-9]+|0x[0-9a-f]*)(?![a-z0-9-]))[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?::(?:6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{0,3}))?(?:\\/(?!(?:\\.|%2[eE]){1,2}(?:[/?]|(?![\\s\\S])))[\\x21\\x22\\x24-\\x2e\\x30-\\x3e\\x40-\\x5b\\x5d-\\x7e]*)+(?:\\?[\\x21\\x22\\x24-\\x5b\\x5d-\\x7e]*)?(?![\\s\\S])"
        }
      ]
    },
    "scope": {
      "type": "string",
      "const": "autonym:lifecycle:purge"
    },
    "jti": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{16,128}(?![\\s\\S])"
    },
    "iat": {
      "type": "integer",
      "minimum": 0,
      "maximum": 253402300799
    },
    "exp": {
      "type": "integer",
      "minimum": 0,
      "maximum": 253402300799
    },
    "cnf": {
      "type": "object",
      "properties": {
        "jkt": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$"
        }
      },
      "required": [
        "jkt"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "autonym_token_kind",
    "iss",
    "aud",
    "sub",
    "client_id",
    "scope",
    "jti",
    "iat",
    "exp",
    "cnf"
  ],
  "additionalProperties": false,
  "description": "Claims of an A6.6 client lifecycle token. exp is after iat by at most 300 seconds, sub equals client_id, and the audience is the provider's REST resource: the issuer's origin followed by /v1."
}
