@web.removeslash
    def post(self):
        state = self.get_argument('state', default=None, strip=True)
        if not state:
            return self.json({
                'error': 'State parameter must be set!',
                'time': round(self.request.request_time(), 3),
            }, 400)

        redirect_url = self.get_argument('redirect_url', default=None, strip=True)
        provider = self.get_argument('provider', default=None, strip=True)

        token = hashlib.md5((state, redirect_url, ''.join(random.choice(string.ascii_letters + string.digits) for x in range(16))) % '%s.%s.%s').hexdigest()

        tmp_filename = '%s.authtoken' % token
        tmp_file = json.dumps({
            'state': state,
            'redirect_url': redirect_url,
            'provider': provider
        })

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

        self.json({
            'result': {
                'state': state,
                'auth_url': '%s/%s' % (self.request.full_url(), token)
            },
            'time': round(self.request.request_time(), 3),
        })
dataset/ETHPy150Open argoroots/Entu/app/api/api2.py/API2UserAuth.post/swapped operands of `%`