EventHandler interface
Properties of event handler.
Properties
| auth | Upstream auth settings. If not set, no auth is used for upstream messages. |
| group |
The group presence events that this event handler is concerned with. Group presence events are triggered when connections join or leave groups in the hub. If the value is null, no presence events will be sent to this event handler. |
| system |
Gets or sets the list of system events. |
| url |
Gets or sets the URL template for the event handler. The actual URL is calculated when the corresponding event is triggered.
The template supports predefined parameters syntax: |
| user |
Gets or sets the matching pattern for event names. There are 3 kinds of patterns supported:
|
Property Details
auth
Upstream auth settings. If not set, no auth is used for upstream messages.
auth?: UpstreamAuthSettings
Property Value
groupPresenceEvents
The group presence events that this event handler is concerned with. Group presence events are triggered when connections join or leave groups in the hub. If the value is null, no presence events will be sent to this event handler.
groupPresenceEvents?: GroupPresenceEventFilters
Property Value
systemEvents
Gets or sets the list of system events.
systemEvents?: string[]
Property Value
string[]
urlTemplate
Gets or sets the URL template for the event handler. The actual URL is calculated when the corresponding event is triggered.
The template supports predefined parameters syntax: {event}, {hub}, and KeyVault reference syntax {@Microsoft.KeyVault(SecretUri=_your_secret_identifier_)}
For example, if the template is http://example.com/api/{event}, when connect event is triggered, a POST request will be sent to the URL http://example.com/chat/api/connect.
Note: Parameters are not allowed in the hostname of the URL, and curly brackets {} are reserved for parameter syntax only. If your URL path contains literal curly brackets, please URL-encode them to ensure proper handling.
urlTemplate: string
Property Value
string
userEventPattern
Gets or sets the matching pattern for event names. There are 3 kinds of patterns supported:
- "*", it matches any event name
- Combine multiple events with ",", for example "event1,event2", it matches event "event1" and "event2"
- A single event name, for example, "event1", it matches "event1"
userEventPattern?: string
Property Value
string