-
Notifications
You must be signed in to change notification settings - Fork 19
Description
While on the Conformance Test Suite conference call, it became clear that there is some confusion around the origin of where the receivers aud
value comes from.
While the spec says:
aud
Transmitter-Supplied, REQUIRED. A string or an array of strings containing an audience claim as defined in JSON Web Token (JWT)[RFC7519] that identifies the Event Receiver(s) for the Event Stream. This property cannot be updated. If multiple Receivers are specified then the Transmitter SHOULD know that these Receivers are the same entity.
The "transmitter-supplied", while correct in the sense this is a response object from the transmitter, is causing confusing that the transmitter is expected to "just know" this value. However this is really part of the "Receiver Configuration" which is NOT IN SPEC.
Basically there exists some flow before the spec that associates a receiver to a transmitter, during this time the receiver would share the audience it wants to set, and would get back a Bearer token to be used for all proceeding calls.
This should be noted in the description that this is a "pre-established" field while associating a receiver and transmitter.
┌─────────────────┐ /reg?aud="https://example.com"┌─────────────────┐
│ ┼────────────────────────────────►│ │
│ │ │ │
│ Receiver │ Register Receiver │ Transmitter │
│ │ │ │
│ │ │ │
│ │◄────────────────────────────────┼ │
│ │ id=123, token="eyBQe..." │ │
│ │ │ │
└─────────────────┘ └─────────────────┘
┌─────────────────┐ /stream {Bearer eyBQe..."} ┌─────────────────┐
│ ┼────────────────────────────────►│ │
│ │ │ │
│ Receiver │ Create New Stream │ Transmitter │
│ │ │ │
│ │ │ │
│ │◄────────────────────────────────┼ │
│ │ {"stream_id":"XYZ", ...} │ │
│ │ │ │
└─────────────────┘ └─────────────────┘