{
  "$id": "https://curveballjs.org/schemas/a12nserver/user.json",
  "$schema": "https://json-schema.org/draft/2019-09/schema",
  "additionalProperties": false,
  "description": "A user",
  "properties": {
    "_links": {
      "description": "HAL Links"
    },
    "active": {
      "description": "If false, the user will not be able to log in.",
      "type": "boolean"
    },
    "createdAt": {
      "description": "Creation date and time.",
      "format": "date-time",
      "type": "string"
    },
    "hasPassword": {
      "description": "Does the user have a password set?",
      "type": "boolean"
    },
    "modifiedAt": {
      "description": "Last time the user was modified.",
      "format": "date-time",
      "type": "string"
    },
    "nickname": {
      "description": "Human-readable displayname for the user.",
      "minLength": 3,
      "type": "string"
    },
    "privileges": {
      "additionalProperties": {
        "items": {
          "type": "string"
        },
        "type": "array"
      },
      "type": "object"
    },
    "type": {
      "const": "user",
      "description": "May be 'user', 'app' or 'group'"
    }
  },
  "required": [
    "nickname",
    "active",
    "createdAt",
    "modifiedAt",
    "type",
    "privileges",
    "hasPassword"
  ],
  "type": "object"
}