.activity_pub.server
cattle_grid.activity_pub.server
This package contains the overall router for all connection needs to the Fediverse. This means the .well-known endpoints.
JrdResponse
Bases: JSONResponse
Response that ensures the content-type is “application/jrd+json”
Source code in cattle_grid/activity_pub/server/__init__.py
nodeinfo_data_responder
async
nodeinfo_data_responder() -> NodeInfo
Returns the information according to the nodeinfo spec
Source code in cattle_grid/activity_pub/server/__init__.py
webfinger_responder
async
Handles requests to .well-known/webfinger. Results are determined by the identifier property of PublicIdentifier matching the resource parameter.
See RFC 7033 WebFinger.
Source code in cattle_grid/activity_pub/server/__init__.py
router
ActivityPub related functionality
APHeaders
ActivityResponse
Bases: JSONResponse
Response that ensures the content-type is “application/activity+json”
Source code in cattle_grid/activity_pub/server/router.py
actor_profile
async
Returns the actor
Source code in cattle_grid/activity_pub/server/router.py
followers
async
Returns the followers
Source code in cattle_grid/activity_pub/server/router.py
following
async
Returns the following
Source code in cattle_grid/activity_pub/server/router.py
outbox
async
Returns an empty ordered collection as outbox
Source code in cattle_grid/activity_pub/server/router.py
router_inbox
ActivityPub related functionality
APHeadersWithDigest
Bases: APHeaders
The addition of digest headers
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x_cattle_grid_requester
|
str
|
|
required |
x_ap_location
|
str
|
|
required |
digest
|
str | None
|
|
None
|
content_digest
|
str | None
|
|
None
|
Source code in cattle_grid/activity_pub/server/router_inbox.py
content_digest
class-attribute
instance-attribute
content_digest: str | None = None
Digest according to RFC 9530 Digest Fields
inbox
async
inbox(
id_str,
request: Request,
headers: Annotated[APHeadersWithDigest, Header()],
broker: Broker,
exchange: InternalExchange,
)
Processes an inbox message
Source code in cattle_grid/activity_pub/server/router_inbox.py
router_object
ActivityPub related functionality
return_object
async
Returns the stored activities