{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-verified-permissions/json-schema/amazon-verified-permissions-is-authorized-with-token-output-schema.json",
  "title": "IsAuthorizedWithTokenOutput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-verified-permissions-isauthorizedwithtoken-api-openapi.yml#/components/schemas/IsAuthorizedWithTokenOutput",
  "type": "object",
  "properties": {
    "decision": {
      "type": "string",
      "enum": [
        "ALLOW",
        "DENY"
      ],
      "description": "An authorization decision that indicates if the authorization request should be allowed or denied."
    },
    "determiningPolicies": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DeterminingPolicyItem"
      },
      "description": "The list of determining policies used to make the authorization decision. For example, if there are multiple matching policies, where at least one is a forbid policy, then because forbid always overrides permit the forbid policies are the determining policies. If all matching policies are permit policies, then those policies are the determining policies. When no policies match and the response is the default DENY, there are no determining policies."
    },
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EvaluationErrorItem"
      },
      "description": "Errors that occurred while making an authorization decision. For example, a policy references an entity or entity attribute that does not exist in the slice."
    },
    "principal": {
      "$ref": "#/$defs/EntityIdentifier"
    }
  },
  "required": [
    "decision",
    "determiningPolicies",
    "errors"
  ],
  "$defs": {
    "DeterminingPolicyItem": {
      "type": "object",
      "properties": {
        "policyId": {
          "type": "string",
          "description": "The Id of a policy that determined to an authorization decision. Example: \"policyId\":\"SPEXAMPLEabcdefg111111\""
        }
      },
      "required": [
        "policyId"
      ]
    },
    "EntityIdentifier": {
      "type": "object",
      "properties": {
        "entityType": {
          "type": "string",
          "description": "The type of an entity. Example: \"entityType\":\"typeName\""
        },
        "entityId": {
          "type": "string",
          "description": "The identifier of an entity. \"entityId\":\"identifier\""
        }
      },
      "required": [
        "entityType",
        "entityId"
      ]
    },
    "EvaluationErrorItem": {
      "type": "object",
      "properties": {
        "errorDescription": {
          "type": "string",
          "description": "The error description."
        }
      },
      "required": [
        "errorDescription"
      ]
    }
  }
}