{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "",
    "type": "object",
    "properties": {
      "auth_mode": {
        "type": "string",
        "pattern": "^(oauth|local|both)$"
      },
      "oauth_client_secret": {
        "type": "string",
        "minLength": 0
      },
      "oauth_redirect_uri": {
        "type": "string",
        "minLength": 0
      },
      "oauth_username_from": {
        "type": "string",
        "pattern": "^(sub|email|preffered_username|login|name)$"
      },
      "oauth_allowed_emails": {
        "type": "array",
        "items": {
          "required": [],
          "properties": {}
        }
      },
      "oauth_permissions": {
        "type": "object",
        "properties": {
          "*": {
            "type": "array",
            "items": {
              "required": [],
              "properties": {}
            }
          }
        },
        "required": [
          "*"
        ]
      },
      "local_users": {
        "type": "array",
        "uniqueItems": true,
        "minItems": 1,
        "items": {
          "required": [
            "user",
            "pass"
          ],
          "properties": {
            "user": {
              "type": "string",
              "minLength": 2
            },
            "pass": {
              "type": "string",
              "minLength": 8
            }
          }
        }
      }
    },
    "required": [
      "auth_mode"
    ]
  }