{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/netcorecloud/json-schema/netcorecloud-login-response-schema.json",
  "title": "LoginResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/netcorecloud-auth-api-openapi.yml#/components/schemas/LoginResponse",
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "description": "JWT access token (15-minute lifetime)."
    },
    "refresh_token": {
      "type": "string",
      "description": "Refresh token (7-day lifetime)."
    },
    "refresh_expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "client_id": {
      "type": "integer"
    },
    "clients": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ClientSummary"
      }
    },
    "is_parent": {
      "type": "boolean"
    },
    "user": {
      "$ref": "#/$defs/UserProfile"
    }
  },
  "$defs": {
    "ClientSummary": {
      "type": "object",
      "properties": {
        "client_id": {
          "type": "integer"
        },
        "clientname": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "inactive"
          ]
        }
      }
    },
    "UserProfile": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "username": {
          "type": "string"
        },
        "email": {
          "type": "string",
          "format": "email"
        },
        "full_name": {
          "type": "string"
        },
        "role": {
          "type": "string",
          "enum": [
            "admin",
            "viewer"
          ]
        },
        "client_id": {
          "type": "integer"
        },
        "two_factor_enabled": {
          "type": "boolean"
        }
      }
    }
  }
}