A WebFinger resource MUST return a JRD as the representation for the resource if the client requests no other supported format explicitly via the HTTP “Accept” header. The client MAY include the “Accept” header to indicate a desired representation; representations other than JRD might be defined in future specifications. The WebFinger resource MUST silently ignore any requested representations that it does not understand or support. The media type used for the JSON Resource Descriptor (JRD) is “application/jrd+json” (see Section 10.2).
Taken at face value, we have the following:
- JRD is the “default” representation when no
Accept
header is provided - Therefore, “the Webfinger resource” can be defined as the actor itself given an Accept header for the activitystreams type(s).
- There is no requirement that the “WebFinger resource” be provided in the form of a resource descriptor
A WebFinger resource MAY redirect the client; if it does, the redirection MUST only be to an “https” URI and the client MUST perform certificate validation again when redirected.
So we can come up with the following as a FEP/pre-FEP, functionally speaking:
GET /.well-known/webfinger?resource=acct:user@social.example HTTP/1.1
Host: social.example
Accept: application/ld+json; profile="https://www.w3.org/ns/activitystreams"
HTTP/1.1 302 Found
Location: https://domain.example/actors/1
This saves having to deal with the semantics of link relations entirely. You could also save an HTTP response by returning the resource directly:
GET /.well-known/webfinger?resource=acct:user@social.example HTTP/1.1
Host: social.example
Accept: application/ld+json; profile="https://www.w3.org/ns/activitystreams"
HTTP/1.1 200 OK
Content-Type: application/ld+json; profile="https://www.w3.org/ns/activitystreams"
{
"id": "https://domain.example/actors/1",
"alsoKnownAs": "acct:user@social.example",
// could also be flipped
}
Posting this as there has been some interest in “an AS2 representation of WebFinger”, which to me seems kind of unnecessary, but might as well be conducted as a theoretical exercise.