def GET(self): ''' 授权成功(用户成功安装应用) ''' data = web.input() if 'hmac' not in data or data['hmac'] != verify.cal_hmac_code(config.AppSecret, data): return 'hmac verify failed' auth_code = data['code'] # 获取Token utils.disable_urllib3_warning() token = publicapp.generate_token(auth_code, redirect_uri_on_auth) return 'authcode=%s token=%s' % (auth_code, token)
def setUp(self): utils.disable_urllib3_warning() config.AppKey = appconfig.PrivateAppKey config.AppSecret = appconfig.PrivateAppSecret
def setUp(self): utils.disable_urllib3_warning() config.AppKey = appconfig.AppKey config.AppSecret = appconfig.AppSecret config.AppScope = list(appconfig.AppScope)
def setUp(self): utils.disable_urllib3_warning() self._app = api.Api (appconfig.AppToken)