{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.caracal.run/schemas/caracal-token-response-2026-05-21.schema.json",
  "title": "Caracal RFC 8693 Token Response",
  "description": "Successful public Caracal STS token-exchange response.",
  "type": "object",
  "required": ["access_token", "token_type", "expires_in", "issued_token_type"],
  "properties": {
    "access_token": {
      "type": "string",
      "minLength": 1
    },
    "token_type": {
      "const": "Bearer"
    },
    "expires_in": {
      "type": "integer",
      "minimum": 1
    },
    "scope": {
      "type": "string"
    },
    "issued_token_type": {
      "const": "urn:ietf:params:oauth:token-type:access_token"
    },
    "target_resources": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "uniqueItems": true
    }
  },
  "additionalProperties": true
}
