From 589a28dbf9495c3d2d904d3ffd46947278eb0a7b Mon Sep 17 00:00:00 2001 From: gcohen Date: Mon, 8 Jun 2015 18:07:40 -0700 Subject: Working example of secure PAM key exchange with client and server actors. --- python/examples/pam_demo/demo.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'python/examples/pam_demo/demo.py') 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 -- cgit v1.2.3