diff options
-rw-r--r-- | users/app/views/webfinger/host_meta.xml.erb (renamed from users/app/views/webfinger/host_meta.erb) | 2 | ||||
-rw-r--r-- | users/lib/.webfinger.rb.swp | bin | 12288 -> 0 bytes | |||
-rw-r--r-- | users/lib/webfinger/host_meta_presenter.rb | 9 |
3 files changed, 10 insertions, 1 deletions
diff --git a/users/app/views/webfinger/host_meta.erb b/users/app/views/webfinger/host_meta.xml.erb index 23b4039..37c9d1e 100644 --- a/users/app/views/webfinger/host_meta.erb +++ b/users/app/views/webfinger/host_meta.xml.erb @@ -1,4 +1,4 @@ - <?xml version='1.0' encoding='UTF-8'?> +<?xml version='1.0' encoding='UTF-8'?> <XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0'> <Subject><%= @host_meta.subject %></Subject> diff --git a/users/lib/.webfinger.rb.swp b/users/lib/.webfinger.rb.swp Binary files differdeleted file mode 100644 index 09528c6..0000000 --- a/users/lib/.webfinger.rb.swp +++ /dev/null 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 |