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.

17 lines
353 B

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