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
Instance Method Summary collapse
- #signature_data ⇒ Object
-
#unique_migration_descriptor ⇒ String
String which is uniquely represents migration occasion.
Methods included from Signable
#sign_with_key, #verify_signature
Methods included from Logging
Instance Method Details
#signature_data ⇒ Object
20 21 22 |
# File 'lib/diaspora_federation/entities/account_migration/signable.rb', line 20 def signature_data unique_migration_descriptor end |
#unique_migration_descriptor ⇒ String
Returns string which is uniquely represents migration occasion.
15 16 17 |
# File 'lib/diaspora_federation/entities/account_migration/signable.rb', line 15 def unique_migration_descriptor "AccountMigration:#{old_identity}:#{new_identity}" end |