From 9c1c6c2a61ad23d5b68eb3794e81c5bee7c7cd46 Mon Sep 17 00:00:00 2001 From: Joar Wandborg Date: Thu, 15 Dec 2011 00:46:10 +0100 Subject: Added *very preliminary* support for webfinger --- .../templates/mediagoblin/webfinger/host-meta.xml | 27 ++++++++++++++++++++++ .../templates/mediagoblin/webfinger/xrd.xml | 26 +++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 mediagoblin/templates/mediagoblin/webfinger/host-meta.xml create mode 100644 mediagoblin/templates/mediagoblin/webfinger/xrd.xml (limited to 'mediagoblin/templates') diff --git a/mediagoblin/templates/mediagoblin/webfinger/host-meta.xml b/mediagoblin/templates/mediagoblin/webfinger/host-meta.xml new file mode 100644 index 00000000..dff2c9aa --- /dev/null +++ b/mediagoblin/templates/mediagoblin/webfinger/host-meta.xml @@ -0,0 +1,27 @@ +{# GNU MediaGoblin -- federated, autonomous media hosting +# Copyright (C) 2011 MediaGoblin contributors. See AUTHORS. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +-#} + + + + {{ request.host }} + + + {{ llrd_title }} + + diff --git a/mediagoblin/templates/mediagoblin/webfinger/xrd.xml b/mediagoblin/templates/mediagoblin/webfinger/xrd.xml new file mode 100644 index 00000000..2ef9b814 --- /dev/null +++ b/mediagoblin/templates/mediagoblin/webfinger/xrd.xml @@ -0,0 +1,26 @@ +{# GNU MediaGoblin -- federated, autonomous media hosting +# Copyright (C) 2011 MediaGoblin contributors. See AUTHORS. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +-#} + + + + {{ uri }} + http://{{ request.host }}/u/{{ username }} + + + -- cgit v1.2.3 From 830a78cdfbb8fc1ee8af770a299f59f26e918aa0 Mon Sep 17 00:00:00 2001 From: Joar Wandborg Date: Thu, 15 Dec 2011 00:58:14 +0100 Subject: Changed some thngs to be compatible with webfinger.org, still *very preliminary* --- mediagoblin/templates/mediagoblin/webfinger/xrd.xml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mediagoblin/templates') diff --git a/mediagoblin/templates/mediagoblin/webfinger/xrd.xml b/mediagoblin/templates/mediagoblin/webfinger/xrd.xml index 2ef9b814..796de89f 100644 --- a/mediagoblin/templates/mediagoblin/webfinger/xrd.xml +++ b/mediagoblin/templates/mediagoblin/webfinger/xrd.xml @@ -20,6 +20,9 @@ {{ uri }} http://{{ request.host }}/u/{{ username }} + + -- cgit v1.2.3 From 9df07e87a8452e47eb594763bb700daf6fb69dbe Mon Sep 17 00:00:00 2001 From: Joar Wandborg Date: Thu, 15 Dec 2011 19:35:53 +0100 Subject: webfinger fully compliant with webfinger.org! Still *preliminary* solution. --- mediagoblin/templates/mediagoblin/webfinger/xrd.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mediagoblin/templates') diff --git a/mediagoblin/templates/mediagoblin/webfinger/xrd.xml b/mediagoblin/templates/mediagoblin/webfinger/xrd.xml index 796de89f..9a793637 100644 --- a/mediagoblin/templates/mediagoblin/webfinger/xrd.xml +++ b/mediagoblin/templates/mediagoblin/webfinger/xrd.xml @@ -17,7 +17,7 @@ - {{ uri }} + {{ request.GET.get('uri') }} http://{{ request.host }}/u/{{ username }} Date: Tue, 20 Dec 2011 22:06:36 +0100 Subject: Polishing the webfinger implementation - Changed quotes in the templates from " to ' - Changed all link generation to use request.urlgen - Moved xrd links data generation from template to view - Added parsing of the account URI using urlparse --- .../templates/mediagoblin/webfinger/host-meta.xml | 12 ++++++------ mediagoblin/templates/mediagoblin/webfinger/xrd.xml | 20 +++++++++----------- 2 files changed, 15 insertions(+), 17 deletions(-) (limited to 'mediagoblin/templates') diff --git a/mediagoblin/templates/mediagoblin/webfinger/host-meta.xml b/mediagoblin/templates/mediagoblin/webfinger/host-meta.xml index dff2c9aa..95a1a176 100644 --- a/mediagoblin/templates/mediagoblin/webfinger/host-meta.xml +++ b/mediagoblin/templates/mediagoblin/webfinger/host-meta.xml @@ -14,14 +14,14 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -#} - - + + {{ request.host }} - - {{ llrd_title }} + + {{ lrdd_title }} diff --git a/mediagoblin/templates/mediagoblin/webfinger/xrd.xml b/mediagoblin/templates/mediagoblin/webfinger/xrd.xml index 9a793637..1fe34577 100644 --- a/mediagoblin/templates/mediagoblin/webfinger/xrd.xml +++ b/mediagoblin/templates/mediagoblin/webfinger/xrd.xml @@ -14,16 +14,14 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -#} - - + + - {{ request.GET.get('uri') }} - http://{{ request.host }}/u/{{ username }} - - - - + {{ subject }} + {{ alias }} + {% for link in links %} + + {%- endfor %} -- cgit v1.2.3