diff options
author | martin f. krafft <madduck@madduck.net> | 2008-03-11 14:00:30 +0100 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-03-11 15:51:11 -0400 |
commit | 23255257134b1abd662503e5ca63b17beeac39ed (patch) | |
tree | 56355c9c0ab343c23c4a5a77cc1a0a274746f59a | |
parent | 0cac528b03a60b09fbec331ddb4f954ddb499fd5 (diff) | |
download | ikiwiki-23255257134b1abd662503e5ca63b17beeac39ed.tar ikiwiki-23255257134b1abd662503e5ca63b17beeac39ed.tar.gz |
Let meta.openid set X-XRDS-Location header
Adds an optional xrds-location parameter to the openid meta handler,
which allows for XRDS delegation.
A good document on XRDS is
http://www.windley.com/archives/2007/05/using_xrds.shtml
Signed-off-by: martin f. krafft <madduck@madduck.net>
-rw-r--r-- | IkiWiki/Plugin/meta.pm | 4 | ||||
-rw-r--r-- | doc/plugins/meta.mdwn | 11 |
2 files changed, 12 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 2df5a727c..b98864722 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -145,6 +145,10 @@ sub preprocess (@) { #{{{ push @{$metaheaders{$page}}, '<link href="'.encode_entities($value). '" rel="openid.delegate" />'; } + if (exists $params{xrds-location} && safeurl($params{xrds-location})) { + push @{$metaheaders{$page}}, '<meta http-equiv="X-XRDS-Location"'. + 'content="'.encode_entities($params{xrds-location}).'" />'; + } } elsif ($key eq 'redir') { return "" if $page ne $destpage; diff --git a/doc/plugins/meta.mdwn b/doc/plugins/meta.mdwn index b503e4511..336c79806 100644 --- a/doc/plugins/meta.mdwn +++ b/doc/plugins/meta.mdwn @@ -64,10 +64,15 @@ Supported fields: * openid Adds html <link> tags to perform OpenID delegation to an external - OpenID server. This lets you use an ikiwiki page as your OpenID. Example: + OpenID server. An optional `xrds-location` parameter lets you specify the + location of any [eXtensible Resource + DescriptorS](http://www.windley.com/archives/2007/05/using_xrds.shtml). - \\[[meta openid="http://joeyh.myopenid.com/" - server="http://www.myopenid.com/server"]] + This lets you use an ikiwiki page as your OpenID. Example: + + \\[[meta openid="http://joeyh.myopenid.com/" + server="http://www.myopenid.com/server" + xrds-location="http://www.myopenid.com/xrds?username=joeyh.myopenid.com""]] * link |