You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
374 B

  1. # frozen_string_literal: true
  2. class ActivityPub::PublicKeySerializer < ActivityPub::Serializer
  3. context :security
  4. attributes :id, :owner, :public_key_pem
  5. def id
  6. [ActivityPub::TagManager.instance.uri_for(object), '#main-key'].join
  7. end
  8. def owner
  9. ActivityPub::TagManager.instance.uri_for(object)
  10. end
  11. def public_key_pem
  12. object.public_key
  13. end
  14. end