Revision: 301
Author: julien.genestoux
Date: Tue Dec 22 13:24:29 2009
Log: Edited wiki page through web user interface.
http://code.google.com/p/pubsubhubbub/source/detail?r=301
Modified:
/wiki/AcceptingSubscriptionForPublishers.wiki
=======================================
--- /wiki/AcceptingSubscriptionForPublishers.wiki Tue Dec 22 13:09:44 2009
+++ /wiki/AcceptingSubscriptionForPublishers.wiki Tue Dec 22 13:24:29 2009
@@ -1,3 +1,5 @@
+DRAFT PROPOSAL, UNFINISHED.
+
#summary This describe a potential extension of the Core Protocol to
enable publisher to preemptively allow specific subscriptions.
= Introduction =
@@ -9,3 +11,15 @@
It's based on callback happening during the subscription mechanism so that
publishers can accept or refuse specific subscriptions. They can also ask
for more information about the subscriber to make that decision.
= Details =
+
+Whenever a subscriber sends a subscription query to a hub, the hub should
fetch (or keep a cached version) to identify a "publisher endpoint" to
which it should forward the subscription parameters. The publisher MAY
define this publisher endpoint url, either via an HTTP header, or via a
specific <link> element inside the feed itself. If no publisher endpoint is
found, the hub must consider that the publisher accepts any subscription.
+
+Once this "publisher endpoint" url is identified, before checking the
subscriber's intent, the hub should send a POST request the subscription
query to the "publisher endpoint", with a `hub.mode= accept`, as well as
the subscription parameters (`hub.topic` and `hub.callback`). The hub MUST
also include any additional parameters provided by the subscriber.
+
+The publisher MAY accept or refuse the subscription. If the subscription
is accepted it MUST return a 200 response, with an empty body. If the
subscription is refused, publisher MUST return a 401 response. The
publisher MAY include additional information in the body. This information
MAY contain an explanation why the subscription was refused, or
instructions (list of required additional parameters) to get the
subscription accepted.
+
+When the publisher accepted the subscription, the hub MUST proceed and
resume the normal subscription process describe in the core specification.
+
+When the publisher refused the subscription. The hub MUST return a 401
response to the subscriber. If a body was included, the hub MUST return it
as well to the subscriber. The subscriber may then re-try its subscription
with any missing parameters.
+
+For any other response (or no response) from the publisher, the hub MUST
consider the subscription as refused.