A Rails engine that implements the non-provider side of the Fediverse Auxiliary Service Provider (FASP) standard.
- Base URL discovery ✅
- Request integrity ✅
- Authentication ✅
- Provider registration ✅
- Accepting registration requests ✅
- Selecting capabilities ✅
- Fetching FASP information ✅
- Capability APIs ⏳
Add to your application's Gemfile:
gem "fasp_client", github: "manyfold3d/fasp_client"
Install configuration and run migrations (you'll also want to do this when upgrading).
bin/rails generate fasp_client:install && bin/rails db:migrate
You will probably want to customise the view templates used for editing and listing providers. You can copy the default views like so:
bin/rails generate fasp_client:views
Mount the engine in your routes.rb
file:
mount FaspClient::Engine => "/fasp"
Add the base URL to your nodeinfo metadata:
"faspBaseUrl" => Rails.application.routes.url_helpers.fasp_client_url
If you're using Federails, you can add this to the metadata using the configuration option (currently only on the nodeinfo-metadata
branch):
conf.nodeinfo_metadata = -> do
{"faspBaseUrl" => Rails.application.routes.url_helpers.fasp_client_url}
end
Edit config/initializers/fasp_client.rb
and add customise the template authenticate
method. It should return true if the current user should be able to access the provider approval/edit pages.
Once you've done that, you can sign up to FASP providers using the URL of your site, and you should be able to register, approve, and choose capabilities.
Currently a simple UI is included at /fasp/providers
; the next version will let you customise this.
The gem is available as open source under the terms of the MIT License.
This code was originally written for the Manyfold project, which is funded through NGI0 Entrust, a fund established by NLnet with financial support from the European Commission's Next Generation Internet program. Learn more at the NLnet project page.