Skip to main content

Module activitypub

Module activitypub 

Source
Expand description

ActivityPub instance (server role). HTTP is served by http.rs over instance.rs; every activity that arrives at an inbox with a valid signature is queued and answered by the model one at a time, in order.

Modules§

actions
What the model does as an ActivityPub instance: answer Follow requests, post notes (to followers and named actors), like, follow and unfollow — in answer to every activity that arrives, signed, at an inbox. Rust owns WebFinger, actor documents, keys, HTTP Signatures and delivery.
http
The HTTP surface an ActivityPub instance serves, for either role: WebFinger, NodeInfo, actor documents, followers/following/outbox collections, objects, and the inboxes — where every POST is verified (HTTP Signature, Digest, Date, actor = signer) before it is queued for whoever answers it.
instance
One small ActivityPub instance, used by both roles: its local actors (each with an RSA key), WebFinger and actor documents, followers and an outbox per actor, fetching and caching remote actors, signed delivery, and verifying what arrives at an inbox. What the actors say comes from the model; this is the federation machinery around it.
sig
HTTP Signatures as the fediverse uses them (draft-cavage-http-signatures-12, rsa-sha256, the form Mastodon and every Fedify fallback speak): signing outgoing requests, verifying incoming ones, and the Digest and Date headers they cover.

Constants§

HEADER_TIMEOUT
INBOX_QUEUE
Verified activities waiting for the model; past it an inbox answers 503.

Functions§

acting
The local actor an action acts as.
apply_shared
Carry out a post, like, follow or unfollow; what happened, for the log or the handler.
base_url
The base URL ids are built from: the operator’s, or http:// and the bound address.
bookkeeping
What Rust settles before the model hears of an activity: follower lists and follows.
event_data
The event the model is shown for an activity.
spawn