You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|host `String`|**Default:`None`** <br> The host to connect to |
83
84
|port `int`|**Default:`None`** <br>Which port to connect to |
84
85
|ssl `bool`|**Default:`True`** <br> Use HTTPS |
86
+
|encryption_master_key `String`|**Default:`None`** <br> The encryption master key for End-to-end Encryption |
85
87
|backend `Object`| an object that responds to the `send_request(request)` method. If none is provided, a `pusher.requests.RequestsBackend` instance is created. |
@@ -252,7 +254,7 @@ Using your `Pusher` instance, with which you initialized `Pusher`, you can gener
252
254
###### Private Channels
253
255
254
256
```python
255
-
auth =pusher.authenticate(
257
+
auth =pusher_client.authenticate(
256
258
257
259
channel=u"private-channel",
258
260
@@ -264,7 +266,7 @@ auth = pusher.authenticate(
264
266
###### Presence Channels
265
267
266
268
```python
267
-
auth =pusher.authenticate(
269
+
auth =pusher_client.authenticate(
268
270
269
271
channel=u"presence-channel",
270
272
@@ -280,6 +282,39 @@ auth = pusher.authenticate(
280
282
# return `auth` as a response
281
283
```
282
284
285
+
## End to End Encryption (Beta)
286
+
287
+
This library supports end to end encryption of your private channels. This means that only you and your connected clients will be able to read your messages. Pusher cannot decrypt them. You can enable this feature by following these steps:
288
+
289
+
1. You should first set up Private channels. This involves [creating an authentication endpoint on your server](https://pusher.com/docs/authenticating_users).
290
+
291
+
2. Next, Specify your 32 character `encryption_master_key`. This is secret and you should never share this with anyone. Not even Pusher.
3. Channels where you wish to use end to end encryption must be prefixed with `private-encrypted-`.
311
+
312
+
4. Subscribe to these channels in your client, and you're done! You can verify it is working by checking out the debug console on the https://dashboard.pusher.com/ and seeing the scrambled ciphertext.
313
+
314
+
**Important note: This will not encrypt messages on channels that are not prefixed by private-encrypted-.**
315
+
316
+
More info on End-to-end Encrypted Channels [here](https://pusher.com/docs/client_api_guide/client_encrypted_channels).
317
+
283
318
## Receiving Webhooks
284
319
285
320
If you have webhooks set up to POST a payload to a specified endpoint, you may wish to validate that these are actually from Pusher. The `Pusher` object achieves this by checking the authentication signature in the request body using your application credentials.
@@ -301,7 +336,7 @@ If you have webhooks set up to POST a payload to a specified endpoint, you may w
301
336
##### Example
302
337
303
338
```python
304
-
webhook =pusher.validate_webhook(
339
+
webhook =pusher_client.validate_webhook(
305
340
306
341
key="key_sent_in_header",
307
342
@@ -341,11 +376,12 @@ Get the list of channels in an application | *✔*
341
376
Get the state of a single channel | *✔*
342
377
Get a list of users in a presence channel | *✔*
0 commit comments