🗒️
notes
  • Journal
  • URLs
  • Java Card
    • SCP02
    • Rapid Notes
    • _FIXVALS_
    • Mifare
    • Chain Of Trust
  • Encoding
    • CBEFF
    • Bytes
  • Snippets
    • JNI_OnLoad
  • float to byte[]
  • Protobuf
  • C/C++
    • Containers
    • Basics
    • JNI
    • gcov
    • Castings
  • chess
    • Untitled
  • Compression
    • Untitled
  • Snippets
    • Untitled
  • Build Systems
    • Maven
    • Windows
  • Gradle
  • CMake
  • Java
    • Untitled
    • Certificates
  • Android
    • Mifare
  • Python
    • ctypes
  • WebSub
    • References
  • Spring Boot
    • Form-based Authentication
    • Basic Access Authentication
    • JWT Authentication
  • QR Code
    • Denso QR Code
  • Philosophical Inquiry
    • First
  • XML
    • xmlstarlet
Powered by GitBook
On this page

Was this helpful?

  1. WebSub

References

PreviousctypesNextForm-based Authentication

Last updated 4 years ago

Was this helpful?

WebSub original name was PubSubHubbub. In 2017, W3C decided the original name was an idiot and rightfully renamed it to WebSub. I compeletely agree.

Best references about the subject:

I noticed that in every flow diagram on WebSub, one flow is always not drawn in the diagram. It is that flow where the subscriber sends back the hub.challenge string back to the hub via GET protocol. Very unusual how several authors does it in the same way.

Key Points:

First, a subscriber reads an html content and likes the content. The subscriber then wants to be notified of updates in the content. The subscriber seeks the hub that the html content is affiliated to in two places:

  • In HTML headers

  • In HTML content

Once the hub is found, a subscription is sent to the hub. The subscriber sends a POST message to the hub , with these headers:

  • hub.mode="subscribe"

  • hub.topic="http://abc.com"

  • hub.callback="http://my.site.com/cb/314159265358979323846"

The hub checks if the topic exists and if so, response back with HTTP 202 ACCEPTED. Furtheremore, the hub sends a GET message to the subscriber`s callback URL and passing the below stuff as query string:

  • hub.mode=subscribe

  • hub.topic=.....same...

  • hub.challenge=xoeusth3coeush33

The subscriber should reply with a GET and a body of pure string, the same secret sent by hub . This completes the subscription process.

When Content Changes

When the content changes, the first person who is aware of this is of course the publisher. The publisher notifies the hub via POST message with:

  • hub.mode="publish"

  • hub.url=<YOU FEED URL>

the hub notifies every subscriber via POST message where the body is the content or diff of content.

How the hell do we find out what valid hub.topic are there that belongs to a hub ???

https://indieweb.org/How_to_publish_and_consume_WebSub
https://www.ably.io/concepts/websub
https://nordicapis.com/websub-common-cases-and-implementations/