Software /
code /
prosody-modules
Comparison
mod_web_push/README.markdown @ 3613:a5da9172362a
mod_web_push: Update README
author | Maxime “pep” Buquet <pep@bouah.net> |
---|---|
date | Sun, 09 Jun 2019 22:02:24 +0200 |
parent | 3612:2cee9fcb318b |
child | 3614:f74444b0e187 |
comparison
equal
deleted
inserted
replaced
3612:2cee9fcb318b | 3613:a5da9172362a |
---|---|
12 missing payload encryption. Other vendors require it all the time. Public and | 12 missing payload encryption. Other vendors require it all the time. Public and |
13 private keys are also statically set in it.** | 13 private keys are also statically set in it.** |
14 ::: | 14 ::: |
15 | 15 |
16 This is an implementation of the server bits of [XEP-XXXX: Web Push]. | 16 This is an implementation of the server bits of [XEP-XXXX: Web Push]. |
17 It allows clients to register a "push server" which is notified about new | 17 |
18 It allows web clients to register a "push server" which is notified about new | |
18 messages while the user is offline, disconnected or the session is hibernated | 19 messages while the user is offline, disconnected or the session is hibernated |
19 by [mod_smacks]. | 20 by [mod_smacks]. |
20 | 21 |
21 Push servers are provided by browser vendors. | 22 Push servers are provided by browser vendors. |
22 | 23 |
23 This module is heavily based on [mod_cloud_notify]. | 24 This module is heavily based on [mod_cloud_notify]. |
25 | |
26 Details | |
27 ======= | |
28 | |
29 [Push API](https://w3c.github.io/push-api/) is a specification by the W3C that | |
30 is essentially the same principle as Mobile OS vendors' Push notification | |
31 systems. It is implemented by most browsers vendors except Safari on iOS | |
32 (mobile). | |
33 | |
34 For more information, see: | |
35 - https://developer.mozilla.org/en-US/docs/Web/API/Push_API | |
36 - https://developers.google.com/web/ilt/pwa/introduction-to-push-notifications | |
37 | |
38 Compared to [XEP-0357: Push Notifications], Web Push doesn't need an App | |
39 Server. | |
40 | |
41 The general flow for subscription is: | |
42 - XMPP server generate ECDH keypair, publishes public key | |
43 - XMPP client generates an ECDH keypair | |
44 - XMPP client fetches server public key | |
45 - XMPP client subscribes to browser Push server using the Web Push API, and | |
46 gets back an HTTP endpoint | |
47 - XMPP client enables Push notifications telling the server the HTTP endpoint, | |
48 and its public key | |
49 | |
50 The flow for notifications is as follow: | |
51 - XMPP server receives an _important_[^1] message | |
52 - XMPP server generates something something JWT + signature with ECDH key | |
53 - XMPP server can optionally include payload encrypted for the client | |
54 - XMPP server initiates HTTP POST request to the Push server | |
55 - Push server sends notification to web browser | |
24 | 56 |
25 Configuration | 57 Configuration |
26 ============= | 58 ============= |
27 | 59 |
28 Option Default Description | 60 Option Default Description |
41 | 73 |
42 Configuration | 74 Configuration |
43 ============= | 75 ============= |
44 | 76 |
45 Configured in-band by supporting clients. | 77 Configured in-band by supporting clients. |
78 | |
79 [^1]: As defined in mod_cloud_notify, or mod_csi_simple. |