def id(self): """The id of the current session, or None if there is no active session. :rtype: int or None """ request = getRequest() if "euphorie.session" in request.other: return request.other["euphorie.session"].id session_id = getCookie(request, getSecret(), "_eu_session") try: return int(session_id) except TypeError: return None
def id(self): """The id of the current session, or None if there is no active session. This method does not perform any security checks. :rtype: int or None """ request = getRequest() if "euphorie.session" in request.other: return request.other["euphorie.session"].id session_id = getCookie(request, getSecret(), "_eu_session") try: return int(session_id) except TypeError: return None
def getCookie(self, request, secret, name): from euphorie.client.cookie import getCookie return getCookie(request, secret, name)