Module: DiasporaFederation::Entities::AccountMigration::Signable

Includes:
Signable
Included in:
DiasporaFederation::Entities::AccountMigration
Defined in:
lib/diaspora_federation/entities/account_migration/signable.rb

Overview

AccountMigration::Signable is a module that encapsulates basic signature generation/verification flow for AccountMigration entity.

It is possible that implementation of diaspora* protocol requires to compute the signature for the AccountMigration entity without instantiating the entity. In this case this module may be useful.

Constant Summary

Constants included from Signable

Signable::DIGEST

Instance Method Summary collapse

Methods included from Signable

#sign_with_key, #verify_signature

Methods included from Logging

included

Instance Method Details

#signature_dataObject



18
19
20
# File 'lib/diaspora_federation/entities/account_migration/signable.rb', line 18

def signature_data
  unique_migration_descriptor
end

#unique_migration_descriptorString

Returns string which is uniquely represents migration occasion

Returns:

  • (String)

    string which is uniquely represents migration occasion



13
14
15
# File 'lib/diaspora_federation/entities/account_migration/signable.rb', line 13

def unique_migration_descriptor
  "AccountMigration:#{old_identity}:#{new_identity}"
end