def parse_message(self, msg, msg_signature, timestamp, nonce):
content = self.crypto.decrypt_message(msg, msg_signature, timestamp, nonce)<EOL>message = xmltodict.parse(to_text(content))['<STR_LIT>']<EOL>message_type = message['<STR_LIT>'].lower()<EOL>message_class = COMPONENT_MESSAGE_TYPES.get(message_type, ComponentUnknownMessage)<EOL>msg = message_class(message)<EOL>if msg.type == '<STR_LIT>':<EOL><INDENT>self.session.set(msg.type, msg.verify_ticket)<EOL><DEDENT>elif msg.type in ('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>msg.query_auth_result = self.query_auth(msg.authorization_code)<EOL><DEDENT>return msg<EOL>
处理 wechat server 推送消息

:params msg: 加密内容
:params msg_signature: 消息签名
:params timestamp: 时间戳
:params nonce: 随机数