A library that provides functionalities needed for the diaspora* federation protocol.
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
app/controllers/diaspora_federation Replace legacy webfinger with new route from .well-known May 28, 2017
bin Fix bin/bundle May 20, 2017
config Allow fetching of posts with dot in the GUID Oct 4, 2018
docs Update JSON schemas for github-pages Oct 5, 2018
lib Release version 0.2.5 Oct 5, 2018
spec Merge pull request #108 from SuperTux88/allow-web-diaspora-urls Oct 5, 2018
test Bump dependency gems and update gemfiles Nov 17, 2018
.codeclimate.yml add .codeclimate.yml Jun 25, 2015
.editorconfig add .editorconfig Jun 18, 2015
.envrc add .envrc for direnv Jun 22, 2015
.gitignore Fix typo in rspec-persistence.txt Apr 4, 2017
.rspec WIP: move test dependencies to gemspec Jun 24, 2015
.rubocop.yml Bump rubocop Jun 17, 2018
.ruby-gemset initial commit Jun 10, 2015
.ruby-version Add ruby 2.4 Jan 19, 2017
.travis.yml Bump ruby versions on travis and add ruby 2.5 Jan 19, 2018
.yardopts add changelog to gems and documentation Jul 14, 2016
CONTRIBUTING.md Fix type in CONTRIBUTING.md Aug 27, 2017
COPYRIGHT Add AGPL-3.0 license text Feb 12, 2017
Changelog.md Update changelog for 0.2.5 Oct 5, 2018
Gemfile Bump pronto-rubocop Oct 4, 2018
Gemfile.lock Bump dependency gems and update gemfiles Nov 17, 2018
Guardfile add guard-rubocop Jan 15, 2016
LICENSE Add AGPL-3.0 license text Feb 12, 2017
README.md Fix server_uri in README Aug 24, 2018
Rakefile Bump rubocop Mar 5, 2018
diaspora_federation-json_schema.gemspec Bump rubocop Mar 5, 2018
diaspora_federation-rails.gemspec Bump rubocop Mar 5, 2018
diaspora_federation-test.gemspec Bump rubocop Mar 5, 2018
diaspora_federation.gemspec Bump faraday Jun 17, 2018


diaspora* federation library

A library that provides functionalities needed for the diaspora* federation protocol

master: Build Status master | develop: Build Status develop

Code Climate Test Coverage Inline docs Gem Version

Gem Documentation | Protocol Documentation | Bugtracker

This repository contains two gems:

  • diaspora_federation provides the functionality for de-/serialization and de-/encryption of Entities in the protocols used for communication among the various installations of diaspora*.
  • diaspora_federation-rails is a rails engine that adds the diaspora* federation protocol to a rails app.


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
          # ... copy person attributes to WebFinger object

    on :fetch_person_for_hcard do |guid|
      # ... fetch hcard information

    # ... other callbacks

The available config settings can be found here and the callbacks are listed here in the gem documentation.


See our contribution guide for more information on how to contribute to the diaspora* federation library.


GNU Affero General Public License.