コード例 #1
0
    def get_all_sessions(self):

        # {session_id => {"remote_ip": "str", "last_used": utctimestamp}}

        # Get keys
        keys = SessionCache.get_all_sessions(self.id)

        output = {}
        for key in keys:
            # Key not guaranteed to be unique across users
            output[key] = SessionCache.get_session_info(self.id, key)

        return output
コード例 #2
0
 def get_target_session(self, session_id):
     """Returns info from a target session key"""
     return SessionCache.get_session_info(self.id, session_id)