

def _get_raw_xsrf_token(self):
    'Read or generate the xsrf token in its raw form.\n\n        The raw_xsrf_token is a tuple containing:\n\n        * version: the version of the cookie from which this token was read,\n          or None if we generated a new token in this request.\n        * token: the raw token data; random (non-ascii) bytes.\n        * timestamp: the time this token was generated (will not be accurate\n          for version 1 cookies)\n        '
    if (not hasattr(self, '_raw_xsrf_token')):
        cookie = self.get_cookie('_xsrf')
        if cookie:
            (version, token, timestamp) = self._decode_xsrf_token(cookie)
        else:
            (version, token, timestamp) = (None, None, None)
        if (token is None):
            version = None
            token = os.urandom(16)
            timestamp = time.time()
        self._raw_xsrf_token = (version, token, timestamp)
    return self._raw_xsrf_token

dataset/ETHPy150Open RobotWebTools/rosbridge_suite/rosbridge_server/src/tornado/web.py RequestHandler._get_raw_xsrf_token/original