Skip to content

Commit

Permalink
spec!: force the publisher JWT to contain the allowed topics (#620)
Browse files Browse the repository at this point in the history
* spec!: force the publisher JWT to contain the allowed topics

* clarify
  • Loading branch information
dunglas committed Jul 29, 2022
1 parent 96a35bf commit 1711b96
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions spec/mercure.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,12 +417,8 @@ To be allowed to publish an update, the JWS presented by the publisher **MUST**
called `mercure`, and this claim **MUST** contain a `publish` key. `mercure.publish` contains an
array of topic selectors. See (#topic-selectors).

If `mercure.publish`:

* is not defined, then the publisher **MUST NOT** be authorized to dispatch any update
* contains an empty array, the publisher **MUST NOT** be authorized to publish private updates,
but can publish public updates for all topics.

If `mercure.publish` is not defined, or contains an empty array, then the publisher **MUST NOT**
be authorized to dispatch any update.
Otherwise, the hub **MUST** check that every topics of the update to dispatch matches at least one
of the topic selectors contained in `mercure.publish`.

Expand Down

0 comments on commit 1711b96

Please sign in to comment.