{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pipeshub/json-schema/pipeshub-oauth-token-response-schema.json",
  "title": "OAuthTokenResponse",
  "description": "OAuth 2.0 Token Response (RFC 6749 Section 5.1).\nContains the access token and optional refresh/ID tokens.\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/OAuthTokenResponse",
  "type": "object",
  "properties": {
    "access_token": {
      "type": "string",
      "description": "The access token for API requests"
    },
    "token_type": {
      "type": "string",
      "description": "Token type (always \"Bearer\")"
    },
    "expires_in": {
      "type": "integer",
      "description": "Access token lifetime in seconds"
    },
    "refresh_token": {
      "type": "string",
      "description": "Refresh token for obtaining new access tokens"
    },
    "scope": {
      "type": "string",
      "description": "Granted scopes (may differ from requested)"
    },
    "id_token": {
      "type": "string",
      "description": "OpenID Connect ID token (JWT) if openid scope was requested"
    }
  }
}