Answering to your first questions, you can create the push node in the following way:
<iq type='set' to='pubsub.mypubsub.com' id='create1'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<create node='punsub_node_for_my_private_iphone' type='push'/>
<configure>
<x xmlns='jabber:x:data' type='submit'>
<field var='FORM_TYPE' type='hidden'>
<value>http://jabber.org/protocol/pubsub#node_config</value>
</field>
<field var='pubsub#access_model'>
<value>whitelist</value>
</field>
<field var='pubsub#publish_model'>
<value>publishers</value>
</field>
</x>
</configure>
</pubsub>
</iq>
Please note the node configuration. The access_model
is set to whitelist
so only whitelisted users can access (see the node). It's OK to leave it empty, then only owner will see it.
Also there is the publish_model
set to publishers
which means that only owner or users with affiliation publish
or publish_only
can publish to this node.
MongooseIM generates publish request on behalf of the node's owner so in fact you don't have to add any other user as a publisher to the push node.
Let me know if his helps and answers your questions.