{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pipeshub/json-schema/pipeshub-oauth-introspect-response-schema.json",
  "title": "OAuthIntrospectResponse",
  "description": "OAuth 2.0 Token Introspection Response (RFC 7662).\nContains token metadata if active, or just `active: false` if not.\n",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pipeshub-oauth-provider-api-openapi.yml#/components/schemas/OAuthIntrospectResponse",
  "type": "object",
  "properties": {
    "active": {
      "type": "boolean",
      "description": "Whether the token is currently active"
    },
    "scope": {
      "type": "string",
      "description": "Scopes granted to the token"
    },
    "client_id": {
      "type": "string",
      "description": "Client ID the token was issued to"
    },
    "username": {
      "type": "string",
      "description": "User identifier (if user-based token)"
    },
    "token_type": {
      "type": "string",
      "description": "Token type"
    },
    "exp": {
      "type": "integer",
      "description": "Token expiration timestamp (Unix epoch)"
    },
    "iat": {
      "type": "integer",
      "description": "Token issuance timestamp (Unix epoch)"
    },
    "nbf": {
      "type": "integer",
      "description": "Token not-before timestamp (Unix epoch)"
    },
    "user_id": {
      "type": "string",
      "description": "User ID"
    },
    "aud": {
      "type": "string",
      "description": "Audience (client ID)"
    },
    "iss": {
      "type": "string",
      "description": "Issuer URL"
    },
    "jti": {
      "type": "string",
      "description": "Unique token identifier"
    }
  },
  "required": [
    "active"
  ]
}