def query_auth(self, authorization_code):
result = self._query_auth(authorization_code)<EOL>assert result is not Noneand '<STR_LIT>' in resultand '<STR_LIT>' in result['<STR_LIT>']<EOL>authorizer_appid = result['<STR_LIT>']['<STR_LIT>']<EOL>if '<STR_LIT>' in result['<STR_LIT>']and result['<STR_LIT>']['<STR_LIT>']:<EOL><INDENT>access_token = result['<STR_LIT>']['<STR_LIT>']<EOL>access_token_key = '<STR_LIT>'.format(authorizer_appid)<EOL>expires_in = <NUM_LIT><EOL>if '<STR_LIT>' in result['<STR_LIT>']:<EOL><INDENT>expires_in = result['<STR_LIT>']['<STR_LIT>']<EOL><DEDENT>self.session.set(access_token_key, access_token, expires_in)<EOL><DEDENT>if '<STR_LIT>' in result['<STR_LIT>']and result['<STR_LIT>']['<STR_LIT>']:<EOL><INDENT>refresh_token = result['<STR_LIT>']['<STR_LIT>']<EOL>refresh_token_key = '<STR_LIT>'.format(authorizer_appid)<EOL>self.session.set(refresh_token_key, refresh_token)  <EOL><DEDENT>return result<EOL>
使用授权码换取公众号的授权信息,同时储存token信息

:params authorization_code: 授权code,会在授权成功时返回给第三方平台，详见第三方平台授权流程说明