donpdonp/camelpub

camelpub

Latest patch on August 6, 2018
binconfig_diron July 31, 2018
libhtml terriblep6 wtfon August 6, 2018
ttest planon July 26, 2018
.ignorefirst stepon July 10, 2018
LICENSEcpan prepon July 24, 2018
META6.jsonXML why noton August 6, 2018
README.mdupdated readmeon August 2, 2018
README.md

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"
}