diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-08-26 13:47:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-26 13:47:38 +0200 |
commit | 00840f4f2edb8d1d46638ccbc90a1f4462d0867a (patch) | |
tree | c4f6c9a4967df5d5f23094ddefed88c621d6c3ff /app/services/reject_follow_service.rb | |
parent | 1cebfed23e03b9d31796cdc139acde1b6dccd9f3 (diff) |
Add handling of Linked Data Signatures in payloads (#4687)
* Add handling of Linked Data Signatures in payloads * Add a way to sign JSON, fix canonicalization of signature options * Fix signatureValue encoding, send out signed JSON when distributing * Add missing security context
Diffstat (limited to 'app/services/reject_follow_service.rb')
-rw-r--r-- | app/services/reject_follow_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/reject_follow_service.rb b/app/services/reject_follow_service.rb index a91266aa4..c1f7bcb60 100644 --- a/app/services/reject_follow_service.rb +++ b/app/services/reject_follow_service.rb @@ -19,11 +19,11 @@ class RejectFollowService < BaseService end def build_json(follow_request) - ActiveModelSerializers::SerializableResource.new( + Oj.dump(ActivityPub::LinkedDataSignature.new(ActiveModelSerializers::SerializableResource.new( follow_request, serializer: ActivityPub::RejectFollowSerializer, adapter: ActivityPub::Adapter - ).to_json + ).as_json).sign!(follow_request.target_account)) end def build_xml(follow_request) |