@web.removeslash
    @web.authenticated
    def get(self, token):
        self.clear_cookie('auth_provider', domain=self.settings['cookie_domain'])

        if not token:
            return self.json({
                'error': 'No token!',
                'time': round(self.request.request_time(), 3),
            }, 400)

        filename = '%s.authtoken' % token
        tmp_file = self.get_tmp_file(filename=filename)

        if not tmp_file:
            return self.json({
                'error': 'Invalid token!',
                'time': round(self.request.request_time(), 3),
            }, 400)

        tmp_file_json = json.loads(tmp_file.get('file', ''))

        tmp_file_json['user'] = self.current_user

        del tmp_file_json['user']['access_token']
        del tmp_file_json['user']['api_key']

        tmp_filename = '%s.usertoken' % token
        tmp_file = json.dumps(tmp_file_json)

        self.set_tmp_file(filename=tmp_filename, content=tmp_file)

        if tmp_file_json.get('redirect_url', None):
            return self.redirect(tmp_file_json.get('redirect_url'))

        self.json({
            'result': tmp_file_json,
            'time': round(self.request.request_time(), 3),
        })
dataset/ETHPy150Open argoroots/Entu/app/api/api2.py/API2UserAuthToken.get/original