diff options
author | tailor <cygnus@janrain.com> | 2007-04-06 17:55:20 +0000 |
---|---|---|
committer | tailor <cygnus@janrain.com> | 2007-04-06 17:55:20 +0000 |
commit | abccf2d93c2f1e25518bedd068b7759a03038b6c (patch) | |
tree | 98396113b819da40d113b81830c1951b4b2f758f /examples | |
parent | 44f369a8f26d28e7a1233573c1ab86518129b7d1 (diff) | |
download | php-openid-abccf2d93c2f1e25518bedd068b7759a03038b6c.zip php-openid-abccf2d93c2f1e25518bedd068b7759a03038b6c.tar.gz php-openid-abccf2d93c2f1e25518bedd068b7759a03038b6c.tar.bz2 |
[project @ Use type URI constants in generating XRDS]
Diffstat (limited to 'examples')
-rw-r--r-- | examples/server/lib/render/idpXrds.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/examples/server/lib/render/idpXrds.php b/examples/server/lib/render/idpXrds.php index 99c363c..bea407c 100644 --- a/examples/server/lib/render/idpXrds.php +++ b/examples/server/lib/render/idpXrds.php @@ -3,13 +3,16 @@ require_once "lib/session.php"; require_once "lib/render.php"; +require_once "Auth/OpenID/Discover.php"; + define('xrds_pat', '<?xml version="1.0" encoding="UTF-8"?> <xrds:XRDS xmlns:xrds="xri://$xrds" xmlns="xri://$xrd*($v*2.0)"> <XRD> <Service priority="0"> - <Type>http://specs.openid.net/auth/2.0/server</Type> + <Type>%s</Type> + <Type>%s</Type> <URI>%s</URI> </Service> </XRD> @@ -20,7 +23,10 @@ function idpXrds_render() { $headers = array('Content-type: application/xrds+xml'); - $body = sprintf(xrds_pat, buildURL()); + $body = sprintf(xrds_pat, + Auth_OpenID_TYPE_2_0, + Auth_OpenID_TYPE_1_1, + buildURL()); return array($headers, $body); } |