Skip to main content

SlashID Events

SlashID events are messages emitted to indicate something of interest has happened. Currently, SlashID events focus on analytics, to help you monitor your SlashID application.

Naming and Versioning

SlashID event names include the event type and version, related by the equation event_name = event_type + version. For example, AuthenticationSucceeded_v1 is the name of the event, which has type AuthenticationSucceeded and version v1 - AuthenticationSucceeded_v1 = AuthenticationSucceeded + v1. There could be multiple versions with the same event type - each would have a different name. As protobuf has backwards compatibility built in, we evolve events without creating new versions, except for the rare occasions when we will need to make breaking changes.

Regional vs Global Events

We have two types of events for operations that are performed globally:

  1. Regional Events:

    • Triggered by operations in a specific region
    • Include InRegion in the event name
    • Example: RoleCreated_InRegion_v1
    • Contain information about the region where the operation occurred
  2. Global Events:

    • Triggered after operations were performed globally
    • Do not include InRegion in the event name
    • Example: RoleCreated_v1

You can subscribe for both of these events.

Event Content

SlashID events are defined using protobuf, and the full definitions can be found here. You can use these definitions to generate code for processing SlashID events - for example, when handling a webhook request.

All SlashID events share EventMetadata, which includes the event ID, and information about what kind of event it is. If the precise event name isn't known, EventTemplate can be used for partial serialization, from which you can inspect the event_name field for full deserialization.

Analytics events also include AnalyticsMetadata, which contains the analytics_correlation_id field. This ID will be set across multiple events originating from the same browsing session, and so can be used to tie together multiple events.

The source field in EventMetadata indicates the origin of the event. Note that events originating from the SDK should be treated with some caution, as it is possible to spoof API calls such that they appear to come from a legitimate deployment of the SlashID SDK.