diff options
author | Azul <azul@leap.se> | 2013-01-22 16:45:01 +0100 |
---|---|---|
committer | Azul <azul@leap.se> | 2013-01-22 16:45:01 +0100 |
commit | 40edf176142bd6092f13bd9f9fb72a2c69d4b052 (patch) | |
tree | 918ac6315214f980cc3672b19ac7e6c82cc2306d /users/lib/webfinger | |
parent | 493dea794285f0874a9235fe14e4350bd53c2a9f (diff) |
fixing xml and adding json representation for host_meta
Diffstat (limited to 'users/lib/webfinger')
-rw-r--r-- | users/lib/webfinger/host_meta_presenter.rb | 9 |
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 |