{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/namirial/json-schema/namirial-authorization-who-am-iresponse-schema.json",
  "title": "AuthorizationWhoAmIResponse",
  "description": "The response model describing the current api user.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/namirial-authorization-api-openapi.yml#/components/schemas/AuthorizationWhoAmIResponse",
  "type": "object",
  "properties": {
    "UserId": {
      "description": "The identifier of the user.",
      "type": "string"
    },
    "Email": {
      "description": "The email address of the user.",
      "type": "string"
    },
    "GivenName": {
      "description": "The given name of the user.",
      "type": "string"
    },
    "Surname": {
      "description": "The surname of the user.",
      "type": "string"
    },
    "UserName": {
      "description": "The user name for synchronizing with an external user provider.",
      "type": "string"
    },
    "Sid": {
      "description": "The security identifier for synchronizing an external user provider.",
      "type": "string"
    },
    "SamlAssignments": {
      "description": "The SAML providers available for login.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/AuthorizationWhoAmISamlAssignment"
      }
    },
    "OAuthAssignments": {
      "description": "The names of the OAuth providers available for login.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "Roles": {
      "description": "The roles assigned to the user.",
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "$defs": {
    "AuthorizationWhoAmISamlAssignment": {
      "description": "The information about the SAML assignment.",
      "type": "object",
      "properties": {
        "ProviderName": {
          "description": "The name of the SAML provider.",
          "type": "string"
        },
        "IdentificationValue": {
          "description": "The value to map from a SAML response to this user.",
          "type": "string"
        }
      }
    }
  }
}