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
This commit is contained in:
@ -20,11 +20,11 @@ class UnblockService < BaseService
|
||||
end
|
||||
|
||||
def build_json(unblock)
|
||||
ActiveModelSerializers::SerializableResource.new(
|
||||
Oj.dump(ActivityPub::LinkedDataSignature.new(ActiveModelSerializers::SerializableResource.new(
|
||||
unblock,
|
||||
serializer: ActivityPub::UndoBlockSerializer,
|
||||
adapter: ActivityPub::Adapter
|
||||
).to_json
|
||||
).as_json).sign!(unblock.account))
|
||||
end
|
||||
|
||||
def build_xml(block)
|
||||
|
Reference in New Issue
Block a user