如何授予每个人对 pubsub feed 的读写访问权限
我想让每个订阅节点的人都能够读取和写入该节点。 Joe 在下面的代码中创建了节点“test5”。当马克尝试发帖时,我收到错误消息。
我正在 iPhone 上使用 XMPPFramework。我收到以下错误 IQ。看来 openfire 告诉我,我无法发布项目,因为我没有访问权限?默认的访问模式是什么,开放吗?
这是否意味着任何人都可以订阅节点“test5”,并且任何人都可以向其发布项目?
最初创建节点“tes5”的假用户的 JID 是“[电子邮件受保护]"
未经授权的消息发布可能是 b/c 标记不是标题为“test5”的节点的所有者吗?
如果我希望马克也能够向该提要发帖怎么办?
<iq xmlns="jabber:client" type="error" from="pubsub.joes-macbook-air.local" to="[email protected]/838f75ba"><pubsub xmlns="http://jabber.org/protocol/pubsub">
<publish node="test5"><item><body>Helpl me</body></item></publish>
</pubsub><error code="403" type="auth">
<forbidden xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
</error>
</iq>
更新:我将订阅者设置为“发布者”。这是通过更改节点的publish_model 来完成的。
I want to give everyone who subscribes to a node the ability to both read and write to that node.
Joe created the node "test5" in the code below. When Mark tries to post, I get an error.
I am using XMPPFramework for iphone. I receive the following error IQ. It appears that openfire is telling me that I can't publish an item b/c I don't have access? What is the default access model, open?
Doesn't that mean that anyone can subscribe to the node "test5", and anyone can publish items to it?
The JID of the fake user who originally created node "tes5" is "[email protected]"
Could the unauthorized message posting be b/c mark is not the owner of node titled "test5"?
What if I want mark to be able to post to this feed as well?
<iq xmlns="jabber:client" type="error" from="pubsub.joes-macbook-air.local" to="[email protected]/838f75ba"><pubsub xmlns="http://jabber.org/protocol/pubsub">
<publish node="test5"><item><body>Helpl me</body></item></publish>
</pubsub><error code="403" type="auth">
<forbidden xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
</error>
</iq>
Update: I made the subscriber a "publisher". This is done by altering the publish_model of the node.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这取决于您的 pubsub 服务中的节点配置。特别是你的节点的访问模式。在 XEP-0060 的访问模型部分中,对不同的访问方法给出了很好的解释。 (1) 您的情况中需要的将是“打开”定义为“任何实体都可以订阅该节点(即,无需订阅批准),并且任何实体都可以从该节点检索项目(即,无需订阅);这应该是通用 pubsub 服务的默认访问模型。 ”
我希望这能为您的问题提供明确的答案。
This depends on the node configurations in your pubsub service. Particularly the access mode of your node. In the XEP-0060 the access models section gives a good explanation on the different access methods. (1) The one you need in your case will be the "Open" which is defined as "Any entity may subscribe to the node (i.e., without the necessity for subscription approval) and any entity may retrieve items from the node (i.e., without being subscribed); this SHOULD be the default access model for generic pubsub services."
I hope this gives a clear answer to your question.