{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/okareo/json-schema/okareo-token-exchange-response-schema.json",
  "title": "TokenExchangeResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/okareo-auth-api-keys-api-openapi.yml#/components/schemas/TokenExchangeResponse",
  "properties": {
    "token": {
      "type": "string",
      "title": "Token"
    },
    "claims": {
      "$ref": "#/$defs/MintedClaims"
    }
  },
  "type": "object",
  "required": [
    "token",
    "claims"
  ],
  "$defs": {
    "MintedClaims": {
      "properties": {
        "sub": {
          "type": "string",
          "title": "Sub"
        },
        "email": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Email"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name"
        },
        "tenantId": {
          "type": "string",
          "title": "Tenantid"
        },
        "tenantIds": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Tenantids"
        },
        "roles": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Roles"
        },
        "type": {
          "type": "string",
          "const": "sessionToken",
          "title": "Type",
          "default": "sessionToken"
        },
        "aud": {
          "type": "string",
          "title": "Aud"
        },
        "iss": {
          "type": "string",
          "title": "Iss"
        },
        "sessionExpiresAt": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sessionexpiresat"
        }
      },
      "type": "object",
      "required": [
        "sub",
        "tenantId",
        "tenantIds",
        "aud",
        "iss"
      ],
      "title": "MintedClaims"
    }
  }
}