diff options
| author | gcohen | 2015-06-08 18:07:40 -0700 | 
|---|---|---|
| committer | gcohen | 2015-06-08 18:07:40 -0700 | 
| commit | 589a28dbf9495c3d2d904d3ffd46947278eb0a7b (patch) | |
| tree | 18973885474ece5a910748dc763f4bf7b96c2bee /python | |
| parent | d2f95778fab683b573c6778dafdd8d0006245d93 (diff) | |
| download | pubnub-python-589a28dbf9495c3d2d904d3ffd46947278eb0a7b.tar.bz2 | |
Working example of secure PAM key exchange with client and server actors.
Diffstat (limited to 'python')
| -rw-r--r-- | python/examples/pam_demo/demo.py | 8 | 
1 files changed, 5 insertions, 3 deletions
| diff --git a/python/examples/pam_demo/demo.py b/python/examples/pam_demo/demo.py index ff91b76..decef8e 100644 --- a/python/examples/pam_demo/demo.py +++ b/python/examples/pam_demo/demo.py @@ -74,11 +74,13 @@ def _client_message_callback(message, channel):  def _client_error_callback(error, channel):      print("Client Error: " + error + " on channel " + channel) -    print("Client will now unsubscribe from this unauthorized channel.") +    print("TTL on grant expired, or token was invalid, or revoked. Client will now unsubscribe from this unauthorized channel.")      client.unsubscribe(channel=channel) -def _server_error_callback(error): -    print("Server Error: " + error) +def _server_error_callback(error, channel): +    print("Server Error: " + error + " on channel " + channel) +    print("TTL on grant expired, or token was revoked. Server will now unsubscribe from this unauthorized channel.") +    server.unsubscribe(channel=channel)  def _server_presence_callback(message, channel):      print message | 
