Esempio n. 1
0
    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
Esempio n. 2
0
    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
Esempio n. 3
0
 def getCookie(self, request, secret, name):
     from euphorie.client.cookie import getCookie
     return getCookie(request, secret, name)
Esempio n. 4
0
 def getCookie(self, request, secret, name):
     from euphorie.client.cookie import getCookie
     return getCookie(request, secret, name)