1 from json import loads, dumps
3 from oauthlib.common import to_unicode
6 def weibo_compliance_fix(session):
8 def _missing_token_type(r):
10 token['token_type'] = 'Bearer'
11 r._content = to_unicode(dumps(token)).encode('UTF-8')
14 session._client.default_token_placement = 'query'
15 session.register_compliance_hook('access_token_response',