Skip to content

Commit 65d152b

Browse files
committed
bug: discuss how to generate the applicationServerKey
closes #45
1 parent acf3de6 commit 65d152b

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

python/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,16 @@ with this distribution.
7575
`bin/vapid --sign claims.json --json` will output the headers in
7676
JSON format, which may be useful for other programs.
7777

78+
`bin/vapid --applicationServerKey` will return the
79+
`applicationServerKey` value you can use to make a restricted
80+
endpoint. See
81+
https://developer.mozilla.org/en-US/docs/Web/API/PushManager/subscribe
82+
for more details. Be aware that this value is tied to the generated
83+
public/private key. If you remove or generate a new key, any
84+
restricted URL you've previously generated will need to be
85+
reallocated. Please note that some User Agents may require you [to
86+
decode this string into a Uint8Array](https://github.com/GoogleChrome/push-notifications/blob/master/app/scripts/main.js).
87+
7888
See `bin/vapid -h` for all options and commands.
7989

8090

python/README.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,14 @@ with this distribution.
8282
``bin/vapid --sign claims.json --json`` will output the headers in JSON
8383
format, which may be useful for other programs.
8484

85+
``bin/vapid --applicationServerKey`` will return the
86+
``applicationServerKey`` value you can use to make a restricted
87+
endpoint. See
88+
https://developer.mozilla.org/en-US/docs/Web/API/PushManager/subscribe
89+
for more details. Be aware that this value is tied to the generated
90+
public/private key. If you remove or generate a new key, any restricted
91+
URL you've previously generated will need to be reallocated. Please note
92+
that some User Agents may require you `to decode this string into a
93+
Uint8Array <https://github.com/GoogleChrome/push-notifications/blob/master/app/scripts/main.js>`__.
94+
8595
See ``bin/vapid -h`` for all options and commands.

0 commit comments

Comments
 (0)