summaryrefslogtreecommitdiff
path: root/users/lib/webfinger/user_presenter.rb
blob: bbfc9081d2f111665fc9f5e01766b3f6536efd61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
class Webfinger::UserPresenter
  attr_accessor :subject

  def initialize(subject, request)
    @subject = subject
    @request = request
  end

  def email_identifier
    "#{@subject.username}@#{@request.host}"
  end

  def key
    Base64.encode64(@subject.public_key.to_s)
  end
end