generate code for requireAuth if $auth used in external function call parameters