Go to file
Sascha Nitsch ef25c5b3af initial import 2024-07-17 00:03:39 +02:00
.phan initial import 2024-07-17 00:03:39 +02:00
htdocs initial import 2024-07-17 00:03:39 +02:00
php initial import 2024-07-17 00:03:39 +02:00
plugins initial import 2024-07-17 00:03:39 +02:00
.gitignore initial import 2024-07-17 00:03:39 +02:00
README.md initial import 2024-07-17 00:03:39 +02:00
composer.json initial import 2024-07-17 00:03:39 +02:00
config.ini initial import 2024-07-17 00:03:39 +02:00
progress.md initial import 2024-07-17 00:03:39 +02:00
release.sh initial import 2024-07-17 00:03:39 +02:00

README.md

A system to connect non-federated system to federation (ActivityPub)

NOTE: this is work in progress, it is nowhere near completion nor function

installation

install dependencies by using

composer install

Upload/copy the files to a directory where php can be run from. The files in the htdocs should be the only reachable, the others should not be served via the web server. Structure:

  • htdocs <= reachable
  • php <= implementation
  • plugins <= plugin directory for well - plugins
  • config.ini <= the configuration

The default config includes a dummy plugin to connect to a non-exisitng server. It accepts any session id and profile name. The database is not used yet, but it must be created and the user with given account data must be able to reach it.

Needed SQL commands:

create database federator;
create user if not exists 'federator'@'localhost' identified by '*change*me*';
grant select,insert,update,delete on federator.* to 'federator'@'localhost';

This will be changed, but works for the current develop verison.

To configure an apache server, add the following rewrite rules:

<Directory /where/ever/you/put/it>
  RewriteEngine on
  RewriteBase /
  RewriteRule ^api/(.+)$ api.php?_call=$1 [L]
</Directory>

With the dummy plugin and everything installed correctly a

curl -v http://localhost/api/v1/dummy/moo -H "X-Session: somethingvalid" -H "X-Profile: ihaveone"

should return a piece of ascii art.