No description
-----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEhmEB3ju5IG5OdOsNlxRkw/GpAZQFAmLUVXUACgkQlxRkw/Gp AZTClwf8Cz/iYEeqBJ47W58zUSV7THUrE8WE6dwaBM+xZdHD9lGSacl6TZ1KhHje xaIGgcKOCG4WaFHzT2GNIZMwkVy4+fikvmxVt5VIZb2WOtuRFm8DmLFPt2kduaWK vt0PNORbHRVnlWEDrxbusTz16sk68F067ut0AfcK6CzSKFimtEmfUIgL3iuMV7m3 lHKK4lR+2i8E1/Y/GT4kcciFOnCxXmVp0OIJtWDGccNjaimsZw4+hwr4yn9GTAXr ew3mHpXPFmBC60PcSmqvZUkh3tLXfMJtwliAo+Y+4qgqVK4G0/bPzIsrJuS5quJi lH6TXc0ZDur6AtH2XODFS2Po29kJTw== =n+2t -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEhmEB3ju5IG5OdOsNlxRkw/GpAZQFAmLUVx0ACgkQlxRkw/Gp AZTsOwf/Wv6/HmDuvPtSNVp1Wb1MlR8MFXU2RyCprwRp+aSoMncvvbAiH3uVzrZd CrVdsM4Rtpf+wV9dEjdYVWS0Q1GQktA5ld+EfJsw0jIpuoETpHB0JWr3w2wTmwFP C9ibjNnCz7CXmWuCTs1mz2AWRp567WcxzCDgP0FHjBopX6MU14SftBqpK553TYEl epnhdOLf9EMwoRJMPMVCsmRddwXWg6UAxRO0Zu03rS8w72xsZ2lA3q1SKP2h4kHD OxR8EzkCYEz15tT3hbl89gD4o2zEco3wBAGWn9GYHzkfB+P5TTYVHParBz1OVA9W xBvQcnZ8E+IGOQ9Es6LuT9Ufm5d3eA== =KSwI -----END PGP SIGNATURE----- Merge tag 'v0.2.8' Version 0.2.8 |
||
|---|---|---|
| .github/workflows | ||
| app/controllers/diaspora_federation | ||
| bin | ||
| config | ||
| docs | ||
| lib | ||
| spec | ||
| test | ||
| .codeclimate.yml | ||
| .editorconfig | ||
| .gitignore | ||
| .rspec | ||
| .rubocop.yml | ||
| .ruby-gemset | ||
| .ruby-version | ||
| .yardopts | ||
| Changelog.md | ||
| CONTRIBUTING.md | ||
| COPYRIGHT | ||
| diaspora_federation-json_schema.gemspec | ||
| diaspora_federation-rails.gemspec | ||
| diaspora_federation-test.gemspec | ||
| diaspora_federation.gemspec | ||
| Gemfile | ||
| Gemfile.lock | ||
| LICENSE | ||
| Rakefile | ||
| README.md | ||
diaspora* federation library
A library that provides functionalities needed for the diaspora* federation protocol
Gem Documentation | Protocol Documentation | Bugtracker
This repository contains two gems:
diaspora_federationprovides the functionality for de-/serialization and de-/encryption of Entities in the protocols used for communication among the various installations of diaspora*.diaspora_federation-railsis a rails engine that adds the diaspora* federation protocol to a rails app.
Usage
Add the gem to your Gemfile:
gem "diaspora_federation-rails"
Mount the routes in your config/routes.rb:
mount DiasporaFederation::Engine => "/"
Configure the engine in config/initializers/diaspora_federation.rb:
DiasporaFederation.configure do |config|
# the pod url
config.server_uri = URI("http://localhost:3000")
# ... other settings
config.define_callbacks do
on :fetch_person_for_webfinger do |diaspora_id|
person = Person.find_local_by_diaspora_id(diaspora_id)
if person
DiasporaFederation::Discovery::WebFinger.new(
# ... copy person attributes to WebFinger object
)
end
end
on :fetch_person_for_hcard do |guid|
# ... fetch hcard information
end
# ... other callbacks
end
end
The available config settings can be found here and the callbacks are listed here in the gem documentation.
Contributing
See our contribution guide for more information on how to contribute to the diaspora* federation library.