def pusher_authentication(): auth = pusher.authenticate(channel=request.form['channel_name'], socket_id=request.form['socket_id'], custom_data={ u'user_id': name, u'user_info': { u'role': u'player' } }) return json.dumps(auth)
def pusher_authentication(): auth = pusher.authenticate(channel=request.form['channel_name'], socket_id=request.form['socket_id'], custom_data={ u'user_id': name, u'user_info': { u'role': u'player' } }) return json.dumps(auth) if __name__ == '__main__': app.run(host='0.0.0.0', port=5000, debug=True) name = ''
def pusher_authentication(): auth = pusher.authenticate(channel=request.form['channel_name'],socket_id=request.form['socket_id']) return json.dumps(auth)
def pusher_authentication(request): auth = pusher.authenticate(channel=request.POST["channel_name"], socket_id=request.POST["socket_id"]) return JsonResponse(auth)