summaryrefslogtreecommitdiff
path: root/users/lib/webfinger/user_presenter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'users/lib/webfinger/user_presenter.rb')
-rw-r--r--users/lib/webfinger/user_presenter.rb35
1 files changed, 0 insertions, 35 deletions
diff --git a/users/lib/webfinger/user_presenter.rb b/users/lib/webfinger/user_presenter.rb
deleted file mode 100644
index 329f477..0000000
--- a/users/lib/webfinger/user_presenter.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-class Webfinger::UserPresenter
- include Rails.application.routes.url_helpers
- attr_accessor :user
-
- def initialize(user, request)
- @user = user
- @request = request
- end
-
- def to_json(options = {})
- {
- subject: subject,
- links: links
- }.to_json(options)
- end
-
- def subject
- "acct:#{@user.email_address}"
- end
-
- def links
- links = {}
- links[:public_key] = { type: 'PGP', href: key } if key
- return links
- end
-
- protected
-
- def key
- if @user.public_key.present?
- Base64.encode64(@user.public_key.to_s)
- end
- end
-
-end