Buildout pre-3.8.1; Anonymise user_id etc, fixes xes #232

This commit is contained in:
James Barnsley
2017-11-19 20:38:36 +13:00
parent b5b02e2d30
commit 4d7e49bd2c
14 changed files with 140 additions and 42 deletions

View File

@ -29,7 +29,7 @@ class WebsocketHandler(tornado.websocket.WebSocketHandler):
# otherwise, just return one of the supplied subprotocols
else:
return protocols['clientid']
return protocols['client_id']
def open(self):
@ -37,7 +37,7 @@ class WebsocketHandler(tornado.websocket.WebSocketHandler):
protocolElements = mem.iris.digest_protocol(self.request.headers.get('Sec-Websocket-Protocol', []))
connection_id = protocolElements['connection_id']
clientid = protocolElements['clientid']
client_id = protocolElements['client_id']
self.connection_id = connection_id
username = protocolElements['username']
created = datetime.strftime(datetime.now(), '%Y-%m-%d %H:%M:%S')
@ -50,7 +50,7 @@ class WebsocketHandler(tornado.websocket.WebSocketHandler):
# construct our client object, and add to our list of connections
client = {
'clientid': clientid,
'client_id': client_id,
'connection_id': connection_id,
'username': username,
'ip': ip,