Help language development. Donate to The Perl Foundation

CamelPub cpan:DONPDONP last updated on 2018-08-06

CamelPub-0.2.6/

INSTALL

install from CPAN

$ zef install CamelPub

install from Source

$ pijul clone https://nest.pijul.org/donpdonp/camelpub
Pulling patches: 100% (60/60), done.
Applying patches: 100% (60/60), done.
$ cd camelpub
$ zef install .  
===> Testing: CamelPub:ver<0.2.0>
===> Testing [OK] for CamelPub:ver<0.2.0>
===> Installing: CamelPub:ver<0.2.0>

1 bin/ script [camelpub] installed to:
/home/donp/.rakudobrew/moar-2018.06/install/share/perl6/site/bin

setup

 $ /home/donp/.rakudobrew/moar-2018.06/install/share/perl6/site/bin/camelpub server
warning: created /home/donp/.config/camelpub/
Creating profile.
What is your preferred username?
> z2
What is your activitypub profile page or homepage? example: https://mastodon.social/users/foo
> https://donpark.org/z2
saving profile to /home/donp/.config/camelpub/activitypub.json
loaded profile for z2@donpark.org https://donpark.org/z2
upgrading database to schema version 1
server listening localhost:2314

From an activitypub site, mastodon for example, do a search for '@z2@donpark.org'. You'll see the requests being made

GET /.well-known/webfinger?resource=acct:z2@donpark.org  
-> acct:z2@donpark.org webfinger returns https://donpark.org/z2

GET /z2 Accept: application/activity+json, application/ld+json 
-> sending activitypub profile for https://donpark.org/z2

GET /z2 Accept: application/activity+json, application/ld+json 
-> sending activitypub profile for https://donpark.org/z2

GET /z2/outbox Accept: application/activity+json, application/ld+json 
activitypub profile requested for unknown path /z2/outbox

and the activitypub friend request itself

POST /z2/inbox  [application/activity+json]
-> https://donpark.org/z2 INBOX POST
-> {
  "signature": {
    "created": "2018-08-02T22:06:44Z",
    "creator": "https://toot.donp.org/users/donpdonp#main-key",
    "type": "RsaSignature2017",
    "signatureValue": "IjQ6vF07QKq9v00E2h5pau9Kx3SvTnSFhjJeEuHBj50poC4bYWgWkg/X0jZosgUA1w2wwZWKsHKg/FcU6wlj+40V0cYfQp3dDAsVd0
GgPOxUXLbizNPbMCLpeRrC3FtSz81kmOTNmP0MrbyA6dJ0t2GwAOVR0E31M3I3GXJKhwtA704ZffimO2J42cdbzspKS6CsqWcnbUQP2oDFn8Pm1Sbf5QpmoKoiG5CusUQmJP2uVWcY+JyCEaAH1R0tDHB6S4iPOYdJS7gWdDt/0Kd0Mc4scE7oJMy2TtXd4jCCv7HWtZp90Mw+nI8SistUGrs1i5v4yp6cHrG26lcJGTMMnQ=="
  },
  "type": "Follow",
  "actor": "https://toot.donp.org/users/donpdonp",
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/security/v1",
    {
      "value": "schema:value",
      "featured": {
        "@id": "toot:featured",
        "@type": "@id"
      },
      "focalPoint": {
        "@container": "@list",
        "@id": "toot:focalPoint"
      },
      "sensitive": "as:sensitive",
      "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
      "Emoji": "toot:Emoji",
      "schema": "http://schema.org#",
      "toot": "http://joinmastodon.org/ns#",
      "conversation": "ostatus:conversation",
      "ostatus": "http://ostatus.org#",
      "movedTo": {
        "@id": "as:movedTo",
        "@type": "@id"
      },
      "PropertyValue": "schema:PropertyValue",
      "atomUri": "ostatus:atomUri",
      "Hashtag": "as:Hashtag",
      "inReplyToAtomUri": "ostatus:inReplyToAtomUri"
    }
  ],
  "id": "https://toot.donp.org/ab524af1-ae09-4268-b8ad-920f8f626111",
  "object": "https://donpark.org/z2"
}