Пример #1
0
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)
Пример #2
0
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 = ''
Пример #3
0
def pusher_authentication():
    auth = pusher.authenticate(channel=request.form['channel_name'],socket_id=request.form['socket_id'])
    return json.dumps(auth)
Пример #4
0
def pusher_authentication(request):
    auth = pusher.authenticate(channel=request.POST["channel_name"],
                               socket_id=request.POST["socket_id"])
    return JsonResponse(auth)