Expand description
Finding an actor by its handle, through WebFinger (RFC 7033).
A handle, @alice@social.example, is an Address: a user and a host.
Fetcher::webfinger asks the host’s WebFinger endpoint for it, through
the guarded client, and reads the actors its self links name. The host
answers only for itself: an actor it names on another origin is a claim an
application that shows the handle should check against the actor, as it
would any other.
Structs§
- Address
- A handle: a user at a host.
- Found
- What a WebFinger answer says of an address.
- Named
- An actor a WebFinger answer names.
- Resolved
- A handle resolved through WebFinger: the handle its host gave as the
subject, and the actor the answer’s first ActivityPubselflink names.
Enums§
- Resolve
Error - Why a handle could not be resolved.
Constants§
- JRD_
ACCEPT - What a WebFinger query asks for.
- XRD_
ACCEPT - What a host-meta query asks for.
Functions§
- confirm_
with - Confirm that
addressnamesactor, as Mastodon’sProcessAccountService#check_webfinger!does before it believes an actor’s handle:resolve_with, and the actor the canonical handle’s answer names has to beactor. Returns what it resolved to, whoseaddressis the handle to show. - lrdd_
template - The WebFinger query template a host-meta document (an XRD) gives in its
lrddlink, as Mastodon’sWebfinger#url_from_templatereads it: the firstLinkelement, in the document’s default namespace, whoserelislrdd. - resolve_
with - Resolve
addressthrough WebFinger as Mastodon’sResolveAccountServicedoes, asking each host withlookup: an answer has to have asubjectand an ActivityPubselflink. When thesubjectis the handle asked about, compared without regard to case, that is the answer; when it is another, that handle is asked about in turn, once, and its answer has to name itself. An application that builds the query URL itself — over plainhttpfor an onion service, say — passes alookupthat callsFetcher::webfinger_at;Fetcher::resolveasks withFetcher::webfinger.