diff options
Diffstat (limited to 'examples/server/lib/render/idpXrds.php')
-rw-r--r-- | examples/server/lib/render/idpXrds.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/examples/server/lib/render/idpXrds.php b/examples/server/lib/render/idpXrds.php new file mode 100644 index 0000000..12ddd18 --- /dev/null +++ b/examples/server/lib/render/idpXrds.php @@ -0,0 +1,28 @@ +<?php + +require_once "lib/session.php"; +require_once "lib/render.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://openid.net/server/2.0</Type> + <URI>%s</URI> + </Service> + </XRD> +</xrds:XRDS> +'); + +function idpXrds_render() +{ + $headers = array('Content-type: application/xrds+xml'); + + $body = sprintf(xrds_pat, buildURL()); + + return array($headers, $body); +} + +?>
\ No newline at end of file |