#activitypub follow-up question: Thanks to @silverpill I made progress with my "Follow" request sent to Mastodon.
-
@achim @silverpill no, I think Mastodon accepts `Person` just fine.
@achim @silverpill you either need to provide an URL to the key itself, with type "PublicKey", and a link to "Person" that is the "owner", or you can provide the URL of the "Person" with an URL fragment "main-key", and your person has to have a "publicKey" property.
-
@achim @silverpill you either need to provide an URL to the key itself, with type "PublicKey", and a link to "Person" that is the "owner", or you can provide the URL of the "Person" with an URL fragment "main-key", and your person has to have a "publicKey" property.
@evan Thanks for your response. @silverpill already mentioned the "main-key" fragment. Is that documented somewhere?
I had an implementation that returned just an object of type "PublicKey" if the "./key" endpoint is called.
I checked what I get back from Mastodon if I call my profile with the "main-key" fragment. The result is the full profile.
So should I either refer to the profile url with the fragment and return the full "Person" OR [...]
-
@evan Thanks for your response. @silverpill already mentioned the "main-key" fragment. Is that documented somewhere?
I had an implementation that returned just an object of type "PublicKey" if the "./key" endpoint is called.
I checked what I get back from Mastodon if I call my profile with the "main-key" fragment. The result is the full profile.
So should I either refer to the profile url with the fragment and return the full "Person" OR [...]
[...] use a dedicated url (i.e. mine with an appended ./key) and just return an object of type "PublicKey"?
-
@evan Thanks for your response. @silverpill already mentioned the "main-key" fragment. Is that documented somewhere?
I had an implementation that returned just an object of type "PublicKey" if the "./key" endpoint is called.
I checked what I get back from Mastodon if I call my profile with the "main-key" fragment. The result is the full profile.
So should I either refer to the profile url with the fragment and return the full "Person" OR [...]
@achim @silverpill yes, it's documented in my book.
-
[...] use a dedicated url (i.e. mine with an appended ./key) and just return an object of type "PublicKey"?
@achim @silverpill I'm rereading the book section on public keys, and it looks good. Do it like that!
-
@achim @silverpill I'm rereading the book section on public keys, and it looks good. Do it like that!
@evan I read that section and implemented the preferred version, not the Mastodon one. That did not work, but I might got confused by other mistakes I made. Will give it another try. Thanks for your help!
-
@achim @silverpill yes, it's documented in my book.
@achim @silverpill So, here's a minimal example of a key object:
https://gist.github.com/evanp/874d92e8f5965fa59352e8c551507254
-
@achim @silverpill So, here's a minimal example of a key object:
https://gist.github.com/evanp/874d92e8f5965fa59352e8c551507254
@achim @silverpill And here's the corresponding person object:
https://gist.github.com/evanp/792c62ebb636eeb7a231ff43cca402e0
-
@achim @silverpill And here's the corresponding person object:
https://gist.github.com/evanp/792c62ebb636eeb7a231ff43cca402e0
@achim @silverpill Some things to note:
- They have to point to each other
- I think the "publicKey" object in the person has to be an embedded object for Mastodon; it won't accept an URL as the property value. -
@evan I read that section and implemented the preferred version, not the Mastodon one. That did not work, but I might got confused by other mistakes I made. Will give it another try. Thanks for your help!
@achim @silverpill OK. Try the samples I gave!
-
@evan Thanks for your response. @silverpill already mentioned the "main-key" fragment. Is that documented somewhere?
I had an implementation that returned just an object of type "PublicKey" if the "./key" endpoint is called.
I checked what I get back from Mastodon if I call my profile with the "main-key" fragment. The result is the full profile.
So should I either refer to the profile url with the fragment and return the full "Person" OR [...]
@achim @evan The fragment ID could be different but it needs to be embedded in your actor document. Here's a JSON schema:
https://codeberg.org/ap-next/ap-next/src/branch/main/schemas/actor.schema.json