Example #1
0
def logout(request, session_id):
    unauth_session = get_unauth_session(request)

    try:
        # Update the unauth session with the hacker bucks and flags
        session = Session.get_session(session_id)
        unauth_session.from_other_session(session)
    except KeyError:
        pass

    AuthenticatedSession.logout(session_id)
    return redirect("crapdb:index")
Example #2
0
def logout(request, session_id):
    unauth_session = get_unauth_session(request)

    try:
        # Update the unauth session with the hacker bucks and flags
        session = Session.get_session(session_id)
        unauth_session.from_other_session(session)
    except KeyError:
        pass

    AuthenticatedSession.logout(session_id)
    return redirect("crapdb:index")
Example #3
0
def sync_session(request, session_id):
    ret = {}
    unauth_session = get_unauth_session(request)

    try:
        # Update the unauth session with the hacker bucks and flags
        session = Session.get_session(session_id)
        unauth_session.from_other_session(session)
    except KeyError:
        pass

    ret = {"hacker_bucks": unauth_session.hacker_bucks}
    return HttpResponse(json.dumps(ret))
Example #4
0
def sync_session(request, session_id):
    ret = {}
    unauth_session = get_unauth_session(request)

    try:
        # Update the unauth session with the hacker bucks and flags
        session = Session.get_session(session_id)
        unauth_session.from_other_session(session)
    except KeyError:
        pass

    ret = {"hacker_bucks": unauth_session.hacker_bucks}
    return HttpResponse(json.dumps(ret))