{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/wallet-connectors-com/json-schema/wallet-connectors-com-user-info-schema.json",
  "title": "UserInfo",
  "description": "JSON attributes for the authenticated subject. PID profile attributes\nrequire the profile scope and disclosure in the selected presentation.\nThey use the same names as in the ID Token. Images omitted only to keep\nthat token within its size limit remain complete here. Verify that sub\nexactly matches the validated ID Token before using these attributes.\n",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/wallet-connectors-com-openapi.yml#/components/schemas/UserInfo",
  "type": "object",
  "required": [
    "sub"
  ],
  "properties": {
    "sub": {
      "type": "string"
    },
    "given_name": {
      "type": "string"
    },
    "family_name": {
      "type": "string"
    },
    "birthdate": {
      "type": "string",
      "format": "date"
    },
    "email": {
      "type": "string",
      "format": "email",
      "description": "Contact address verified separately by bridge code; not PID-certified."
    },
    "email_verified": {
      "type": "boolean",
      "const": true
    },
    "age_over_18": {
      "type": "boolean",
      "const": true,
      "description": "Only for dedicated age-verification clients; no PID identity attributes are returned."
    },
    "place_of_birth": {
      "description": "Structured birthplace. Optional string components can be empty in the returned profile. Legacy opaque birthplace text is preserved under pid_claims.birth_place instead of this field.",
      "type": "object",
      "anyOf": [
        {
          "required": [
            "country"
          ]
        },
        {
          "required": [
            "region"
          ]
        },
        {
          "required": [
            "locality"
          ]
        }
      ],
      "properties": {
        "locality": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "region": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "nationalities": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[A-Z]{2,3}$"
      },
      "description": "Disclosed nationality codes; a single PID nationality is wrapped in an array."
    },
    "sex": {
      "description": "Original disclosed PID value and JSON type; not converted to gender."
    },
    "expiry_date": {
      "description": "Original disclosed PID expiry value and JSON type; distinct from the ID Token exp claim."
    },
    "portrait": {
      "description": "Original disclosed portrait. An mdoc binary portrait is transported as an unpadded base64url string. Complete in UserInfo even when omitted from the ID Token for size."
    },
    "picture": {
      "type": "string",
      "description": "Disclosed picture value when supplied, preserved without conversion. Complete in UserInfo even when omitted from the ID Token for size."
    },
    "pid_claims": {
      "type": "object",
      "additionalProperties": true,
      "description": "Additional PID attributes or values without a top-level mapping. Legacy opaque birthplace text is preserved as birth_place."
    }
  }
}