6 ms·
Unfortunately not. Activitypub Identities are @username@hostname. When you have one of these and want to find the user, you have to ask hostname at ... ht
by mg 3y ago
Unfortunately not. Activitypub Identities are @username@hostname.
When you have one of these and want to find the user, you have to ask hostname at ...
https://{hostname}/.well-known/webfinger?resource={...}
... for more infos about the user. {...} being an urlencoded version of "acct:{user}@{hostname}".
Then you will get a bunch of stuff, including so called "aliases". Which are urls. Many services provide aliases of the form hostname/@username or hostname/users/username. Which are endpoints that display something about the user. But that is not part of the protocol and differs from service to service.
- tedunangst 3y agoTotally backwards. The AP identity is whatever url endpoint you want it to be. People use webfinger to turn @handles into that url, but you can also just use the url directly. Grab the actor, find the inbox, send your post.
- mg 3y agoThat is not how I read the specs. Let's look at an example: My handle is @mg@masto.ai What is my "AP identity" in your interpretation of the AP protocol?
- sieabahlpark 3y ago[dead]
- tedunangst 3y agoIt's https://masto.ai/users/mg https://masto.ai/users/mg. You can see it by running curl -H "Accept: application/ld+json". https://www.w3.org/TR/activitypub/#obj-id https://www.w3.org/TR/activitypub/#obj-id
- mg 3y agoThat is one of the aliases. The same holds true for ... https://masto.ai/users/mg https://masto.ai/@mg ... and the server could povide as many aliases as it wants to. I wouldn't call those "identities". As the server could just change the aliases and the handle "@mg@masto.ai" would still work. Because it resolves to whatever aliases the server provides via the webfinger endpoint. I have not seen anything in the specs that says the aliases are identities or should stay the same over time.
- vidarh 3y agoTry this: curl -H "Accept: application/json" https://masto.ai/users/mg/following?page=1 | jq . Notice the people you are following are referenced by URL. If you try /followers instead, and look up the following URLs of some of your followers, you'll find that they follow you by the URL https://masto.ai/users/mg If you do: curl -H "Accept: application/json" https://masto.ai/@mg | jq .id You'll see that the returned document shows the id of your ActivityPub Person actor as https://masto.ai/users/mg https://masto.ai/users/mg, not https://masto.ai/@mg https://masto.ai/@mg or @mg@masto.ai. @mg@masto.ai can change and nothing will happen (even old mentions should still work, as at least Mastodon resolves the mentions to the Actor url and includes a mapping in the post). But if the https://masto.ai/users/mg https://masto.ai/users/mg URL changes, you will need to trigger a move, or you'll lose your followers, because from their servers point of view, that URL is your identity or in ActivityPub speak it's the identity of your Person Actor and for most purposes that's all ActivityPub cares about. So while you can introduce aliases in webfinger, and for the purposes of webinger your id is mg@masto.ai, if the primary ID of the ActivityPub Person actor changes, you need a "movedTo" element to point to the new one, an "alsoKnownAs" to point to the old one, and trigger notifications to the servers of your followers and following for things not to break horribly. See e.g.: curl -H "Accept: application/json" https://mastodon.social/@vidarh | jq .movedTo And curl -H "Accept: application/json" https://m.galaxybound.com/users/vidar | jq .alsoKnownAs This is not in the ActivityPub spec - it was added as an extension as people started to want to be able to move more smoothly. (I personally don't like this dependency on the old server in the move process, and so one of the few things I actually like about BlueSky is the ability for a user to take their data to a new server unilaterally; that could be fixed for the Fediverse without an entirely new protocol, however - it just needs a mechanism similar to the recovery key mechanism of BlueSky to let users prove who they are on a new server) In effect, you have two identities in the Fediverse: * You have a webfinger identity acct:mg@masto.ai * You have an ActivityPub Person actor identity https://masto.ai/users/mg https://masto.ai/users/mg Changing the former, or adding more of them (you can even just add a redirect on your own domain and user@yourowndomain will work and resolve to your https://masto.ai/users/mg https://masto.ai/users/mg identity; this is how my Mastodon is on m.galaxybound.com but my preferred Mastodon handle is @vidar@galaxybound.com without the "m."), is easy. Changing the latter is complex (more than it should be).
- jeroenhd 3y agoYou're thinking of Mastodon. There's no mention of using @ in identities at all in the ActivityPub spec: https://www.w3.org/TR/activitypub/#actor-objects https://www.w3.org/TR/activitypub/#actor-objects Usernames can be represented as whatever, but they're not the user IDs. Peertube implements ActivityPub and uses username@server instead of @username@server, and so does Pixelfed. Funkwhale uses https://hostname.tld/federation/actors/Alice https://hostname.tld/federation/actors/Alice as their ActivityPub identifier (they support multiple federation protocols) and doesn't have a clear representation of user + domain as far as I can tell.
- mg 3y agoThere is no mention of "identities" or "identity" in the spec either. So if a person is available via ActivityPub, how do they reference their "identity"? When you want to say "Follow me via ActivityPub: ..." - what is "..."? The most common form I see is @username@hostname. Is there a more universal form? How does a Pixelfed user do it?
- vidarh 3y agoThe most common form is @username@hostname, sure, because it's convenient, and also because doing a webfinger lookup of that is more generic - a webfinger response can include far more than AcrivityPub endpoints. But specifically for ActivityPub the URL works just fine (try pasting it in the Mastodon search box, for example, and up pops the user details exactly as if you'd used @user@host)
- mg 3y agoYou say "the url works" as if there is a clearly defined url for every Fediverse user. But the way I read the specs, that is not the case. Some servers link you to hostname/users/username, some use hostname/@username, some use hostname/username when you look up a user via webfinger. And the way I read the specs, those don't have to be permanent. A server could change their scheme from hostname/users/username to hostname/u/username and would not violate the protocol. Because the way to identify the user is via a webfinger lookup. Maybe the only way to say who you are on the Fediverse is "I am <username> on <hostname>. Look me up through Webfinger"? That might be the equivalent of saying "I am https://masto.ai/.well-known/webfinger?resource=acct%3Amg%40masto.ai https://masto.ai/.well-known/webfinger?resource=acct%3Amg%40..."
- numpad0 3y agoSince more people are trying to prove you wrong, I’d argue it can’t be too late for Mastodon to fix that username scheme used in the frontend app. And agreed that double @ is stupid.
- vidarh 3y agoMastodon supports URI's in the UI, and resolves @user@host names to profile URI's when you post as it is, so the use of webfinger is almost entirely a presentation/convenience issue anyway. I also dislike the double "@", but I get the thinking that starting "@" has to some extent become a signifier that what follows is a social handle.