summaryrefslogtreecommitdiff
path: root/users/lib/webfinger
diff options
context:
space:
mode:
Diffstat (limited to 'users/lib/webfinger')
-rw-r--r--users/lib/webfinger/host_meta_presenter.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/users/lib/webfinger/host_meta_presenter.rb b/users/lib/webfinger/host_meta_presenter.rb
index 3901a28..b48729c 100644
--- a/users/lib/webfinger/host_meta_presenter.rb
+++ b/users/lib/webfinger/host_meta_presenter.rb
@@ -14,4 +14,13 @@ class Webfinger::HostMetaPresenter
def webfinger_template(path = 'webfinger', query_param='q')
"#{subject}/#{path}?#{query_param}={uri}"
end
+
+ def to_json(options)
+ {
+ subject: subject,
+ links: {
+ lrdd: { type: 'application/xrd+xml', template: webfinger_template }
+ }
+ }.to_json(options)
+ end
end