{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/apptio/json-schema/apptio-login-state-schema.json",
  "title": "LoginState",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/apptio-frontdoor-api-openapi.yml#/components/schemas/LoginState",
  "type": "object",
  "properties": {
    "page": {
      "type": "string"
    },
    "successMessage": {
      "$ref": "#/$defs/FDErrorMessage"
    },
    "errorMessage": {
      "$ref": "#/$defs/FDErrorMessage"
    },
    "requestId": {
      "type": "string"
    },
    "destinationUrl": {
      "type": "string"
    },
    "domain": {
      "type": "string"
    },
    "username": {
      "type": "string"
    },
    "password": {
      "type": "string",
      "writeOnly": true
    },
    "loginRedirect": {
      "type": "string"
    },
    "environmentId": {
      "type": "string",
      "format": "uuid"
    },
    "applicationId": {
      "type": "string",
      "format": "uuid"
    },
    "appTypes": {
      "type": "string"
    },
    "consentUrl": {
      "type": "string"
    },
    "consentAccepted": {
      "type": "boolean"
    },
    "impersonate": {
      "type": "boolean"
    },
    "impersonateUser": {
      "type": "string"
    },
    "i18nEnabled": {
      "type": "boolean"
    },
    "hasMultipleLanguages": {
      "type": "boolean"
    },
    "lang": {
      "type": "string"
    },
    "acceptOtherLang": {
      "type": "boolean"
    },
    "viewportWidth": {
      "type": "integer",
      "format": "int32"
    },
    "viewportHeight": {
      "type": "integer",
      "format": "int32"
    },
    "stateNonce": {
      "type": "string"
    },
    "codeVerifier": {
      "type": "string"
    },
    "logoUrl": {
      "type": "string"
    },
    "faviconUrl": {
      "type": "string"
    },
    "logoWideUrl": {
      "type": "string"
    },
    "oauthClientName": {
      "type": "string"
    },
    "oauthScopes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EnvUserRolesScoped"
      }
    },
    "oauthClientId": {
      "type": "string"
    },
    "oauthCodeChallenge": {
      "type": "string"
    },
    "oauthCodeChallengeMethod": {
      "type": "string"
    }
  },
  "$defs": {
    "EnvUserRolesScoped": {
      "type": "object",
      "properties": {
        "envId": {
          "type": "string"
        },
        "envName": {
          "type": "string"
        },
        "customerName": {
          "type": "string"
        },
        "roles": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "FDErrorMessage": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/Id"
        },
        "error": {
          "type": "string"
        },
        "translationKey": {
          "type": "string"
        },
        "substitutions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "errors": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "Id": {
      "required": [
        "id"
      ],
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        }
      }
    }
  }
}