Why not use proxyUrl
from ActivityPub?
Is this what youāre referring to? ActivityPub
This is pretty close to what weāre working on here, but maybe not exact? Iām having a hard time finding any better documentation on this, or anyone implementing this in the wild to use as a reference. proxyUrl
seems to to expect a POST
that will authenticate a user to view a remote stream, not the simple GET
address on their home server.
If this is already meant/used in this way, then weāre great, and nothing needs to be added to Activity Intents. But if it is in use for different purposes, then weād be breaking something.
I will keep digging to see if I can find this in use already.
we could extend proxyUrl to allow GET with query parameter instead of just POST with form-encoded parameter. itās already quite similar to mastodonās remote interaction handler, except that one takes uri
parameter instead of id
.
GET /authorize_interaction?uri=https://object.example HTTP/1.1
Host: mastodon.example
this loads some page that shows the object and allows you to either follow an account or view a status.
basically i am saying that the definition of proxyUrl could be expanded to allow GET and then it can be used as a link relation:
{
"rel": "https://www.w3.org/ns/activitystreams#proxyUrl",
"href": "https://mastodon.example/authorize_interaction"
}
GET /authorize_interaction?id=https://object.example HTTP/1.1
Host: mastodon.example
this is assuming you really need a GET. personally i donāt see a reason to care about GET vs POST here, and in fact a POST can make sense because you are not simply asking for a representation, you are potentially resolving and caching a remote object into the local database.
I found some information on the ActivityPub primer that says this is really intended for authenticated, C2S requests using POST.
I think weāre discussing something similar in spirit to proxyUrl
but very different in the details. This feature in Activity Intents is aimed at helping me get back to my home server when Iām out on the open Internet.
So, I think we might take some ideas from this, but we shouldnāt try to extend or repurpose this existing data point. That would only lead to confusion.
Hey, I never got back around to this, directly. Iām going to write this up using Object
and see how it looks.
You made a good point about using View
activities for this. I really want that one to work out, but unless weāre expecting to send View
documents for every item we view, we should probably not use it in this way.
how is that different? when youāre out on the āopen internetā, you can look up your own webfinger, take the link with the correct rel, and then plug your āopen internetā URI into that endpoint. i donāt see how that isnāt just basically mastodonās existing authorize_interaction
endpoint, or how thatās any different than as:proxyUrl
in spirit. the only technical difference is that proxyUrl generally returns JSON-LD instead of a HTML web UI, but that can be handled by conneg.
I think you identified the issue. As itās in use now, proxyUrl
expects a POST
and returns JSON. I want something pretty similar that expects a GET
and returns an HTML page.
If we simply repurpose proxyUrl
, there would be no way of knowing if the server supports a POST/JSON endpoint or a GET/HTML endpoint. It would confuse existing systems, and completely break Activity Intents.
I donāt want to clutter up WebFinger responses with unnecessary additions, but Activity intents is an incremental change that will take time for the many Fediverse projects to implement. We canāt use this existing value and expect everyone has already implemented it āthe new way.ā Doing that would kill adoption of Activity Intents entirely.
ā
I missed this point in your original note, sorry:
Yes, https://w3id.org/fep/3b86/Object
would be very similar to Mastodonās /authorize_interaction
endpoint. Several other activities also map directly to Mastodon APIs. The difference is that weāre not hard-coding a Mastodon-specific path, so different projects can support the feature set without mimicking Mastodonās URL layouts, too.