DataForm getAuthRequestForm(NodeSubscription subscription, Locale preferredLocale) {
        getLogger().trace("Get data form to be sent to node owners for them to approve a new subscription request from '{}'", subscription.getJID());

        DataForm form = new DataForm(DataForm.Type.form);
        form.setTitle(LocaleUtils.getLocalizedString("pubsub.form.authorization.title", preferredLocale));
        form.addInstruction(LocaleUtils.getLocalizedString("pubsub.form.authorization.instruction", preferredLocale));

        FormField formField = form.addField();
        formField.setVariable("FORM_TYPE");
        formField.setType(FormField.Type.hidden);
        formField.addValue("http://jabber.org/protocol/pubsub#subscribe_authorization");

        formField = form.addField();
        formField.setVariable("pubsub#subid");
        formField.setType(FormField.Type.hidden);
        formField.addValue(subscription.getID());

        formField = form.addField();
        formField.setVariable("pubsub#node");
        formField.setType(FormField.Type.text_single);
        formField.setLabel(LocaleUtils.getLocalizedString("pubsub.form.authorization.node", preferredLocale));
        formField.addValue(nodeID);

        formField = form.addField();
        formField.setVariable("pubsub#subscriber_jid");
        formField.setType(FormField.Type.jid_single);
        formField.setLabel(LocaleUtils.getLocalizedString("pubsub.form.authorization.subscriber", preferredLocale));
        formField.addValue(subscription.getJID().toString());

        formField = form.addField();
        formField.setVariable("pubsub#allow");
        formField.setType(FormField.Type.boolean_type);
        formField.setLabel(LocaleUtils.getLocalizedString("pubsub.form.authorization.allow", preferredLocale));
        formField.addValue(Boolean.FALSE);

        return form;
    }
Returns the data form to be included in the authorization request to be sent to
node owners when a new subscription needs to be approved.

@param subscription the new subscription that needs to be approved.
@return the data form to be included in the authorization request.
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/Node.java