{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "title": "Auth Event",
  "description": "Application authentication event specific structure",
  "extends": {
    "$comment": "Extends common event structure",
    "$ref": "event.json"
  },
  "properties": {
    "principalType": {
      "title": "Principal Type",
      "description": "Type of principal",
      "type": "string"
    },
    "identityRequestId": {
      "title": "Identity Request ID",
      "description": "Identity request identifier",
      "type": "string"
    },
    "authenticationMethods": {
      "title": "Authentication Methods",
      "description": "List of authentication methods involved in this authentication resolution",
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "BIO",
          "PIN",
          "WORKFLOW",
          "CAUTH",
          "SEAMLESS",
          "TRU_PIN",
          "BADGE",
          "FIDO2",
          "PASSKEY",
          "FACE",
          "FINGERPRINT"
        ]
      }
    },
    "assertionType": {
      "title": "Assertion Type",
      "description": "Type of assertion",
      "$comment": "Describes how was authentication action (request) resolved, which assertion was involved",
      "type": "string",
      "enum": [
        "BIOMETRIC",
        "BEHAVIORAL",
        "POSSESSION",
        "BADGE",
        "BADGE_AND_PIN",
        "BIOMETRIC_UNLOCK",
        "BEHAVIORAL_UNLOCK",
        "POSSESSION_UNLOCK",
        "POSSESSION_LOCK",
        "PIN",
        "PIN_UNLOCK",
        "BIOMETRIC_AND_PIN",
        "BIOMETRIC_AND_PIN_UNLOCK",
        "UNKNOWN",
        "UNKNOWN_UNLOCK",
        "EMPTY",
        "EMPTY_UNLOCK",
        "THIRD_PARTY_FIDO2",
        "WORKFLOW_AUTH",
        "WORKSTATION_UNLOCK_PROXIMITY",
        "WORKSTATION_UNLOCK_PROXIMITY_AND_BIOMETRIC",
        "WORKSTATION_UNLOCK_PROXIMITY_AND_PIN",
        "WORKSTATION_UNLOCK_NETWORK",
        "WORKSTATION_UNLOCK_DEVICE_BIOMETRIC",
        "WORKSTATION_LOCK_PROXIMITY",
        "WORKSTATION_LOCK_USER_ACTION",
        "WORKSTATION_LOCK_NETWORK",
        "WORKSTATION_LOGON_PROXIMITY",
        "WORKSTATION_LOGON_PROXIMITY_AND_BIOMETRIC",
        "WORKSTATION_LOGON_PROXIMITY_AND_PIN",
        "WORKSTATION_LOGON_NETWORK",
        "WORKSTATION_LOGOFF_USER_ACTION",
        "WORKSTATION_LOGOFF_NETWORK",
        "WORKSTATION_LOGON_NATIVE_PLUS_PROXIMITY",
        "WORKSTATION_UNLOCK_NATIVE_PLUS_PROXIMITY",
        "WORKSTATION_LOGON_STANDALONE_PIN",
        "WORKSTATION_LOGON_STANDALONE_BIO",
        "SEAMLESS"
      ]
    },
    "identificationAnnotation": {
      "title": "Identification Annotation",
      "description": "DEPRECATED: removed from event before processing. Identification annotation",
      "deprecated": true,
      "type": "string",
      "enum": [
        "BIO_REQUIRED_BY_POLICY",
        "ENFORCE_BIO_REQUESTED",
        "FLUID_ID_POSITIVE",
        "FLUID_ID_NEGATIVE",
        "PLATFORM_UNAVAILABLE",
        "BIOMETRIC_INVALID",
        "BIOMETRIC_CANCELLED",
        "BIOMETRIC_OTHER",
        "FLUID_ID_NO_MODEL",
        "FLUID_ID_NOT_ENOUGH_DATA",
        "FLUID_ID_INVALID_SCORE",
        "FLUID_ID_LOCKOUT_INVALID_SCORE",
        "FLUID_ID_NO_DATA",
        "POSSESSION_REQUIRED_BY_POLICY"
      ]
    },
    "policy": {
      "title": "Policy",
      "description": "Policy if any involved in action initiated this event",
      "$ref": "event.json#/$defs/event-policy"
    },
    "workflow": {
      "title": "Workflow",
      "description": "Workflow if any involved in action initiated this event",
      "$ref": "event.json#/$defs/event-workflow"
    },
    "tcat": {
      "title": "TCAT",
      "description": "DEPRECATED: replaced by cauthMetrics. TCAT metrics involved in action initiated this event",
      "$ref": "#/$defs/auth-event-cauth",
      "deprecated": true
    },
    "cauthMetrics": {
      "title": "CAUTH",
      "description": "CAUTH metrics involved in action initiated this event",
      "$comment": "Property called metrics, they are evaluated and sent by WA/MA for auth events",
      "$ref": "#/$defs/auth-event-cauth"
    },
    "ssoSessionId": {
      "title": "SSO Session ID",
      "description": "SSO session identifier",
      "type": "string"
    },
    "faceScores": {
      "title": "Face Scores",
      "description": "Scores for facial recognition",
      "$ref": "event.json#/$defs/face-scores"
    }
  },
  "$defs": {
    "auth-event-cauth": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "title": "CAUTH",
      "description": "CAUTH metrics involved in action initiated this event",
      "type": "object",
      "properties": {
        "decayedRisk": {
          "title": "Decayed Risk",
          "description": "Continuous authentication score which controls seamless-SSO or other similar passive decisions that aren’t necessarily taken simultaneously with user actively providing behavioral biometric",
          "type": "integer"
        }
      }
    }
  }
}
