Skip to main content

Module interop

Module interop 

Source
Expand description

Interop / discovery helpers.

This module rounds out the crate’s public Solid surface with small, framework-agnostic helpers for ecosystem discovery flows:

  • .well-known/solid — Solid Protocol §4.1.2 discovery document.
  • WebFinger — RFC 7033, used to map acct: URIs to WebIDs.
  • NIP-05 verification — Nostr pubkey ↔ DNS name binding.
  • Dev-mode session bypass — consumer-crate helper for tests.

None of these helpers perform network I/O on their own; they return response bodies and signal objects that the consumer crate wires into its HTTP server.

Structs§

DevSession
Dev-mode session — ergonomic handle a consumer crate can plug into its request-processing pipeline in place of NIP-98/OIDC verification during tests or local development. The bypass is only constructable via explicit allow, never through a header the client supplies.
Nip05Document
NIP-05 response document (the JSON served at .well-known/nostr.json?name=<local>).
SolidWellKnown
Solid Protocol .well-known/solid discovery document. The doc advertises the OIDC issuer, the pod URL, and the Notifications endpoint. JSS parity: includes api.accounts URLs.
SolidWellKnownAccounts
JSS-compatible account endpoint URLs.
SolidWellKnownApi
JSS-compatible account management API pointers.
WebFingerJrd
WebFinger JRD (JSON Resource Descriptor) response.
WebFingerLink

Functions§

dev_session
Build a dev-session bypass. Callers are expected to gate this on a top-level ENABLE_DEV_SESSION=1 or similar environment check — the helper itself will not read env to avoid accidental activation.
nip05_document
Build the NIP-05 document structure for a pod’s own hosted names.
nodeinfo_2_1
/.well-known/nodeinfo/2.1 content document, per nodeinfo.diaspora.software §3 (schema 2.1).
nodeinfo_discovery
/.well-known/nodeinfo discovery document (JSON), per nodeinfo.diaspora.software §6. Points clients at one or more versioned NodeInfo docs.
verify_nip05
Verify a NIP-05 identifier (local@example.com) against a fetched NIP-05 document. Returns the resolved hex pubkey on success.
webfinger_response
Produce a WebFinger JRD response pointing acct:user@host at the user’s WebID. Returns None if the resource is not recognised.
well_known_solid
Build the discovery document for a pod root.