{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/codeb/json-schema/codeb-vp-response-result-schema.json",
  "title": "VpResponseResult",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/codeb-openapi.json#/components/schemas/VpResponseResult",
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "completed",
        "verified",
        "error"
      ]
    },
    "session_id": {
      "type": "string"
    },
    "presentation": {
      "type": "object"
    },
    "network_config": {
      "$ref": "#/$defs/NetworkConfig",
      "description": "Present only when scope=network_access was requested at vp-start."
    },
    "sso_assertion": {
      "type": "string",
      "description": "Opaque token that a downstream RP can redeem via OIDC code exchange."
    }
  },
  "$defs": {
    "NetworkConfig": {
      "type": "object",
      "description": "Signed WiFi / APN / VPN configuration issued to a wallet after successful PID presentation with scope=network_access. Signature is a compact JWS (ES256, x5c chain) — wallet verifies against the tenant verifier cert, then provisions the network profile on the device.",
      "required": [
        "profile_id",
        "network_type",
        "expires_at",
        "signature"
      ],
      "properties": {
        "profile_id": {
          "type": "string",
          "description": "Tenant-configured profile name (e.g. 'guest-wifi-hotel', 'corporate-vpn')."
        },
        "network_type": {
          "type": "string",
          "enum": [
            "wifi-wpa2-eap",
            "wifi-wpa3-eap",
            "wifi-wpa2-psk",
            "wifi-hotspot20",
            "apn-4g",
            "apn-5g",
            "openvpn",
            "wireguard"
          ]
        },
        "ssid": {
          "type": "string",
          "description": "WiFi SSID (when network_type is wifi-*)"
        },
        "eap_method": {
          "type": "string",
          "description": "PEAP / TTLS / TLS / MSCHAPv2 (WPA2/3-EAP profiles)"
        },
        "identity": {
          "type": "string",
          "description": "Derived from PID claims per tenant policy (e.g. given_name.family_name@tenant.example)"
        },
        "password_or_psk": {
          "type": "string",
          "description": "Ephemeral per-session credential; not present for cert-based EAP-TLS."
        },
        "ca_certificate_pem": {
          "type": "string",
          "description": "Radius CA the wallet should trust for the corporate WPA2-EAP server."
        },
        "expires_at": {
          "type": "string",
          "format": "date-time",
          "description": "Absolute expiry — wallet MUST discard the profile after this timestamp."
        },
        "signature": {
          "type": "string",
          "description": "Compact JWS (ES256, x5c chain to tenant verifier cert) over the canonicalised config body."
        }
      }
    }
  }
}