daf56655 by 周伟奇

fix bug

1 parent f5327d6b
......@@ -13,10 +13,10 @@ from settings import conf
iwa_url_params = {
'scope': 'openid',
'response_type': 'code',
'redirect_uri': conf.REDIRECT_URI,
'redirect_uri': conf.IWA_REDIRECT_URI,
'client_id': conf.IWA_CLIENT_ID
}
iwa_url_params_str = '&'.join(['{0}={1}'.format(k, v) for k, v in iwa_url_params])
iwa_url_params_str = '&'.join(['{0}={1}'.format(k, v) for k, v in iwa_url_params.items()])
iwa_url = '{0}authorize?{1}'.format(conf.IWA_URL, iwa_url_params_str)
client_id_base64 = base64.b64encode('{0}:{1}'.format(
conf.IWA_CLIENT_ID, conf.IWA_CLIENT_SECRET).encode('utf-8')).decode('utf-8')
......
......@@ -121,7 +121,7 @@ class IWABaseView:
'code': code,
'redirect_uri': redirect_uri,
}
get_params_str = '&'.join(['{0}={1}'.format(k, v) for k, v in get_params_dict])
get_params_str = '&'.join(['{0}={1}'.format(k, v) for k, v in get_params_dict.items()])
iwa_token_url = '{0}access_token?{1}'.format(iwa_url_base, get_params_str)
res = requests.post(iwa_token_url, headers=headers)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!