예제 #1
0
def doLogout(request):
    try:
        session_id = request.COOKIES['session_id']
        username = getUsernameForSession(session_id)
        sessions_client.command('logoutAccount', [username])
        livewire_client.command('clearSession', [session_id])
    except KeyError:
        pass
예제 #2
0
 def process_request(self, request):
     for omitted_path in omitted_paths:
         if request.path.lower().startswith(omitted_path):   return
     
     if not request.COOKIES.has_key('session_id'):   return
     
     session_id = request.COOKIES['session_id']
     if session_id:
         sessions_client.command('ping',[session_id])