change api authorizePublish, for rewrite packet.