{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ovh/json-schema/ovh-auth-details-schema.json",
  "title": "auth.Details",
  "description": "Details about the authentication used",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ovh-v1-auth-openapi.yml#/components/schemas/auth.Details",
  "type": "object",
  "properties": {
    "account": {
      "type": "string",
      "description": "Customer identifier",
      "readOnly": true
    },
    "allowedRoutes": {
      "type": [
        "array",
        "null"
      ],
      "description": "Allowed API routes, null means everything",
      "items": {
        "$ref": "#/$defs/auth.AccessRule"
      },
      "readOnly": true
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "description": "Description of the authenticated identity",
      "readOnly": true
    },
    "identities": {
      "type": "array",
      "description": "Identities of the current session: corresponds to all the authentication provider identities that could be used to match IAM policies",
      "items": {
        "type": "string"
      },
      "readOnly": true
    },
    "method": {
      "allOf": [
        {
          "$ref": "#/$defs/auth.MethodEnum"
        }
      ],
      "description": "Authentication method",
      "readOnly": true
    },
    "roles": {
      "type": [
        "array",
        "null"
      ],
      "description": "Roles of the authenticated identity",
      "items": {
        "type": "string"
      },
      "readOnly": true
    },
    "user": {
      "type": [
        "string",
        "null"
      ],
      "description": "Username of the authenticated identity",
      "readOnly": true
    }
  },
  "$defs": {
    "auth.AccessRule": {
      "type": "object",
      "description": "Access rule allowed to an application",
      "properties": {
        "method": {
          "allOf": [
            {
              "$ref": "#/$defs/auth.HTTPMethodEnum"
            }
          ],
          "description": "Allowed Method",
          "readOnly": true
        },
        "path": {
          "type": "string",
          "description": "Allowed path",
          "readOnly": true
        }
      }
    },
    "auth.HTTPMethodEnum": {
      "type": "string",
      "description": "All HTTP methods available",
      "enum": [
        "DELETE",
        "GET",
        "PATCH",
        "POST",
        "PUT"
      ]
    },
    "auth.MethodEnum": {
      "type": "string",
      "description": "All authentication methods available",
      "enum": [
        "account",
        "oauth2_client_credentials",
        "provider",
        "user"
      ]
    }
  }
}