Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 55d6bdcd9c1f11b2c302b21b067884e1 > files > 22

php-pear-Auth_OpenID-2.2.2-2.mga4.noarch.rpm

<?php

require_once "lib/session.php";
require_once "lib/render.php";

require_once "Auth/OpenID/Discover.php";

define('idp_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>%s</Type>
      <URI>%s</URI>
    </Service>
  </XRD>
</xrds:XRDS>
');

function idpXrds_render()
{
    $headers = array('Content-type: application/xrds+xml');

    $body = sprintf(idp_xrds_pat,
                    Auth_OpenID_TYPE_2_0_IDP,
                    buildURL());

    return array($headers, $body);
}

?>