14 lines
419 B
Python
14 lines
419 B
Python
|
#!/usr/bin/python
|
||
|
# -*- coding: utf-8 -*-
|
||
|
|
||
|
class UtilitiesHttp:
|
||
|
|
||
|
def is_jid_matches_to_session(accounts, sessions, request):
|
||
|
jabber_id = request.cookies.get('jabber_id')
|
||
|
session_key = request.cookies.get('session_key')
|
||
|
if (jabber_id and
|
||
|
jabber_id in accounts and
|
||
|
jabber_id in sessions and
|
||
|
session_key == sessions[jabber_id]):
|
||
|
return jabber_id
|