URI で指定したエンティティに関する情報を照会するプロトコル。
http を使用してやりとりされる。
URI は、たとえば ActivityPub でユーザ名として扱われる `acct:` や、web ページのアドレスとして広く使われている `https:` など。ほかに知らない。
WebFinger
https://webfinger.net/
RFC 7033 - WebFinger
https://datatracker.ietf.org/doc/html/rfc7033
webfinger - ActivityPubまとめwiki
https://scrapbox.io/activitypub/webfinger
webfinger を使って、ユーザ名 acct:user@example.com と http エンドポイント*1 https://example.com/user を相互に照会できる。
webfinger エンドポイントは下記のような URL をもち、`resource=` に任意の URI を与えることで該当するエンティティの情報を返す。
https://kumarin.co/.well-known/webfinger?resource=acct:mg@kumarin.co
https://kumarin.co/.well-known/webfinger?resource=https://don.kumarin.co/@mg
上記2つの応答内容は同じ。
応答の例
{ "subject": "acct:mg@kumarin.co", "aliases": [ "https://don.kumarin.co/@mg", "https://don.kumarin.co/users/mg" ], "links": [ { "rel": "http://webfinger.net/rel/profile-page", "type": "text/html", "href": "https://don.kumarin.co/@mg" }, { "rel": "self", "type": "application/activity+json", "href": "https://don.kumarin.co/users/mg" }, { "rel": "http://ostatus.org/schema/1.0/subscribe", "template": "https://don.kumarin.co/authorize_interaction?uri={uri}" } ] }
webfinger が示すユーザが任意の URI を購読するためのエンドポイントを、この rel をもつひな形で取得できる。
11. Discovery - Draft: OStatus 1.0 Draft 2
https://ostatus.github.io/spec/OStatus%201.0%20Draft%202.html#anchor10
たとえば acct:Mogami@example.com について照会した webfinger 応答に
{ "rel": "http://ostatus.org/schema/1.0/subscribe", "template": "https://example.com/authorize_interaction?uri={uri}" }
が含まれるとき、`{uri}` に `acct:Oyodo@example.social` を与えると、Mogami@example.com が Oyodo@example.social をフォロー (購読) するためのエンドポイント
https://example.com/authorize_interaction?uri=acct:Oyodo@example.social
を導くことができ、これに @Mogami がアクセスすることで @Oyodo をフォローできる。という感じ。
Mastodon/mastodon#26075 において導入された interaction modal *2 には、訪問者が自分のアカウントがあるサーバー (home) の URL などを入力することで訪問者が home サーバー上でフォローや投稿のお気に入り登録ができる UI が搭載された。
Change interaction modal in web UI
https://github.com/mastodon/mastodon/pull/26075
この仕組みのなかで当 API で転送先となるひな形を取得しているようすがみえる。
Misskey フォークの めいすきー (commit 259385f)*3、Areionskey (commit 5080208) もこの API を用いて同様の機能を実装している。