def handle_validate_token(self, req):
token = req.path_info_pop()<EOL>if req.path_info or not token.startswith(self.reseller_prefix):<EOL><INDENT>return HTTPBadRequest(request=req)<EOL><DEDENT>expires = groups = None<EOL>memcache_client = cache_from_env(req.environ)<EOL>if memcache_client:<EOL><INDENT>memcache_key = '<STR_LIT>' % (self.reseller_prefix, token)<EOL>cached_auth_data = memcache_client.get(memcache_key)<EOL>if cached_auth_data:<EOL><INDENT>expires, groups = cached_auth_data<EOL>if expires < time():<EOL><INDENT>groups = None<EOL><DEDENT><DEDENT><DEDENT>if not groups:<EOL><INDENT>object_name = self._get_concealed_token(token)<EOL>path = quote('<STR_LIT>' %<EOL>(self.auth_account, object_name[-<NUM_LIT:1>], object_name))<EOL>resp = self.make_pre_authed_request(<EOL>req.environ, '<STR_LIT:GET>', path).get_response(self.app)<EOL>if resp.status_int // <NUM_LIT:100> != <NUM_LIT:2>:<EOL><INDENT>return HTTPNotFound(request=req)<EOL><DEDENT>detail = json.loads(resp.body)<EOL>expires = detail['<STR_LIT>']<EOL>if expires < time():<EOL><INDENT>self.make_pre_authed_request(<EOL>req.environ, '<STR_LIT>', path).get_response(self.app)<EOL>return HTTPNotFound(request=req)<EOL><DEDENT>groups = [g['<STR_LIT:name>'] for g in detail['<STR_LIT>']]<EOL>if '<STR_LIT>' in groups:<EOL><INDENT>groups.remove('<STR_LIT>')<EOL>groups.append(detail['<STR_LIT>'])<EOL><DEDENT>groups = '<STR_LIT:U+002C>'.join(groups)<EOL><DEDENT>return HTTPNoContent(headers={'<STR_LIT>': expires - time(),<EOL>'<STR_LIT>': groups})<EOL>
Handles the GET v2/.token/<token> call for validating a token, usually
        called by a service like Swift.

        On a successful validation, X-Auth-TTL will be set for how much longer
        this token is valid and X-Auth-Groups will contain a comma separated
        list of groups the user belongs to.

        The first group listed will be a unique identifier for the user the
        token represents.

        .reseller_admin is a special group that indicates the user should be
        allowed to do anything on any account.

        :param req: The swob.Request to process.
        :returns: swob.Response, 2xx on success with data set as explained
                  above.