--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WampAuthentication.py Tue Dec 18 13:31:27 2018 +0100
@@ -0,0 +1,19 @@
+# XXX remove that crap, seriously +from connectors import WAMP +from autobahn.wamp import auth +class WampSession(WAMP.WampSession): + self.join(u"Automation", [u"wampcra"], u"smarteh") + print("CRA checking ...") + def onChallenge(self, challenge): + if challenge.method == "wampcra": + key = auth.derive_key("smarteh", "salt123", 100, 16) + return auth.compute_wcs(key, challenge.extra['challenge']) + raise Exception("don't know how to handle authmethod {}".format(challenge.method))