Skip to content

Commit 260aaac

Browse files
authored
Merge pull request #775 from FusionAuth/update-webhooks-events
Update webhooks events
2 parents 155cf08 + 35f4159 commit 260aaac

File tree

3 files changed

+84
-11
lines changed

3 files changed

+84
-11
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This is a tenant or application scoped event. It can be sent to all applications in a tenant or to one or more specified applications.
2+
3+
The ability to limit the generation of an event for only certain applications is legacy functionality and may be modified in the future. You almost certainly want to enable this event at the tenant level and optionally filter on the `applicationId` when consuming the event.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This is a tenant scoped event.

site/docs/v1/tech/events-webhooks/events.adoc

Lines changed: 80 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,21 @@ These are the events that FusionAuth generates that can be optionally consumed b
2727
* <<JWT Refresh>> - when an access token is refreshed using a refresh token
2828
* <<JWT Refresh Token Revoke>> - when a refresh token (or multiple tokens) are revoked
2929

30+
=== Tenant Scoped Events
31+
32+
Tenant scoped events are generated for all applications in a tenant or for none of them.
33+
34+
All user events are tenant scoped because a user is a tenant scoped entity. For example, the `user.delete`, `user.create`, `user.update`, and `user.deactivate` events are all tenant scoped.
35+
36+
A tenant scoped event can, however contain an `applicationId` which can be used to filter events when received. One example is `user.registration.create`.
37+
3038
=== Application Scoped Events
3139

3240
A few events can be generated for one or more specified applications, or for all applications within a tenant.
3341

3442
[WARNING]
3543
====
36-
The ability to limit the generation of an event for only certain applications is legacy functionality and may be modified in the future. You almost certainly want to use a tenant scoped event and optionally filter on the `applicationId` when consuming the event.
44+
The ability to limit the generation of an event for only certain applications is legacy functionality and may be modified in the future. If you want to get events for certain applications, send events for a tenant. Filter on the `applicationId` when consuming the event and discard events from any applications that are not of interest.
3745
====
3846

3947
These events can be application scoped:
@@ -42,16 +50,6 @@ These events can be application scoped:
4250
* `jwt.refresh-token.revoke`
4351
* `user.action`
4452

45-
=== Tenant Scoped Events
46-
47-
Any events which are not application scoped events are tenant scoped.
48-
49-
Tenant scoped events can't be limited to fire only for a certain application. These events are either generated for all applications in a tenant or for none of them.
50-
51-
All user events are tenant scoped because a user is a tenant scoped entity. For example, the `user.delete`, `user.create`, `user.update`, and `user.deactivate` events are all tenant scoped.
52-
53-
A tenant scoped event can, however contain an `applicationId` which can be used to filter events when received. One example is `user.registration.create`.
54-
5553
== User Actions
5654

5755
This event is generated when a User Action is taken on a user and when temporal actions transition between phases.
@@ -64,6 +62,10 @@ A temporal action is one that has a start time and and a duration, when a phase
6462
user.action
6563
----
6664

65+
=== Event Scope
66+
67+
include::docs/v1/tech/events-webhooks/_tenant-or-application-scoped-event.adoc[]
68+
6769
=== Event Body
6870

6971
[.api]
@@ -159,6 +161,10 @@ The final state of the operation which caused the webhook is not persisted to Fu
159161
user.bulk.create
160162
----
161163

164+
=== Event Scope
165+
166+
include::docs/v1/tech/events-webhooks/_tenant-scoped-event.adoc[]
167+
162168
=== Event Body
163169

164170
[.api]
@@ -198,6 +204,10 @@ The final state of the operation which caused the webhook is not persisted to Fu
198204
user.create
199205
----
200206

207+
=== Event Scope
208+
209+
include::docs/v1/tech/events-webhooks/_tenant-scoped-event.adoc[]
210+
201211
=== Event Body
202212

203213
[.api]
@@ -235,6 +245,10 @@ This event is generated when a user is updated. The event will include the befor
235245
user.update
236246
----
237247

248+
=== Event Scope
249+
250+
include::docs/v1/tech/events-webhooks/_tenant-scoped-event.adoc[]
251+
238252
=== Event Body
239253

240254
[.api]
@@ -276,6 +290,9 @@ This event is generated when a user is deactivated, also referred to as a soft d
276290
user.deactivate
277291
----
278292

293+
=== Event Scope
294+
295+
include::docs/v1/tech/events-webhooks/_tenant-scoped-event.adoc[]
279296

280297
=== Event Body
281298

@@ -315,6 +332,10 @@ This event is generated when user is re-activated, a re-activated user is one th
315332
user.reactivate
316333
----
317334

335+
=== Event Scope
336+
337+
include::docs/v1/tech/events-webhooks/_tenant-scoped-event.adoc[]
338+
318339
=== Event Body
319340

320341
[.api]
@@ -353,6 +374,10 @@ This event is generated when a user is deleted.
353374
user.delete
354375
----
355376

377+
=== Event Scope
378+
379+
include::docs/v1/tech/events-webhooks/_tenant-scoped-event.adoc[]
380+
356381
=== Event Body
357382

358383
[.api]
@@ -395,6 +420,10 @@ This event is generated when a user verifies their email address.
395420
user.email.verified
396421
----
397422

423+
=== Event Scope
424+
425+
include::docs/v1/tech/events-webhooks/_tenant-scoped-event.adoc[]
426+
398427
=== Event Body
399428

400429
[.api]
@@ -437,6 +466,10 @@ This event is generated when a user completes a successful login.
437466
user.login.success
438467
----
439468

469+
=== Event Scope
470+
471+
include::docs/v1/tech/events-webhooks/_tenant-scoped-event.adoc[]
472+
440473
=== Event Body
441474

442475
[.api]
@@ -496,6 +529,10 @@ This event is generated when a user login request fails due to invalid credentia
496529
user.login.failed
497530
----
498531

532+
=== Event Scope
533+
534+
include::docs/v1/tech/events-webhooks/_tenant-scoped-event.adoc[]
535+
499536
=== Event Body
500537

501538
[.api]
@@ -547,6 +584,10 @@ This event is generated when Reactor detects a user is using a vulnerable, or br
547584
user.password.breach
548585
----
549586

587+
=== Event Scope
588+
589+
include::docs/v1/tech/events-webhooks/_tenant-scoped-event.adoc[]
590+
550591
=== Event Body
551592

552593
[.api]
@@ -591,6 +632,10 @@ The final state of the operation which caused the webhook is not persisted to Fu
591632
user.registration.create
592633
----
593634

635+
=== Event Scope
636+
637+
include::docs/v1/tech/events-webhooks/_tenant-scoped-event.adoc[]
638+
594639
=== Event Body
595640

596641
[.api]
@@ -639,6 +684,10 @@ This event is generated when a user registration has been updated.
639684
user.registration.update
640685
----
641686

687+
=== Event Scope
688+
689+
include::docs/v1/tech/events-webhooks/_tenant-scoped-event.adoc[]
690+
642691
=== Event Body
643692

644693
[.api]
@@ -691,6 +740,10 @@ This event is generated when a user registration has been deleted.
691740
user.registration.delete
692741
----
693742

743+
=== Event Scope
744+
745+
include::docs/v1/tech/events-webhooks/_tenant-scoped-event.adoc[]
746+
694747
=== Event Body
695748

696749
[.api]
@@ -739,6 +792,10 @@ This event is generated when a user registration has been verified.
739792
user.registration.verified
740793
----
741794

795+
=== Event Scope
796+
797+
include::docs/v1/tech/events-webhooks/_tenant-scoped-event.adoc[]
798+
742799
=== Event Body
743800

744801
[.api]
@@ -783,6 +840,10 @@ This event is generated when a public key configuration used to sign a JSON web
783840
jwt.public-key.update
784841
----
785842

843+
=== Event Scope
844+
845+
include::docs/v1/tech/events-webhooks/_tenant-or-application-scoped-event.adoc[]
846+
786847
=== Event Body
787848

788849
[.api]
@@ -825,6 +886,10 @@ This event is generated when an access token is refreshed using a refresh token.
825886
jwt.refresh
826887
----
827888

889+
=== Event Scope
890+
891+
include::docs/v1/tech/events-webhooks/_tenant-scoped-event.adoc[]
892+
828893
=== Event Body
829894

830895
[.api]
@@ -877,6 +942,10 @@ The following scenarios will cause this event to be generated:
877942
jwt.refresh-token.revoke
878943
----
879944

945+
=== Event Scope
946+
947+
include::docs/v1/tech/events-webhooks/_tenant-or-application-scoped-event.adoc[]
948+
880949
=== A single Refresh Token is revoked
881950

882951
This example JSON would reflect a scenario where a single refresh token is revoked for a single user for a single application.

0 commit comments

Comments
 (0)