Customization of authorize_reply_query