Sophie

Sophie

distrib > Mageia > 7 > aarch64 > by-pkgid > 1dddb8b6a0f4a2b4873784ecb6b79a3a > files > 26

php-pear-Auth_OpenID-2.2.2-10.mga7.noarch.rpm

<?php

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

require_once "Auth/OpenID/Discover.php";

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

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

    $body = sprintf(user_xrds_pat,
                    Auth_OpenID_TYPE_2_0,
                    Auth_OpenID_TYPE_1_1,
                    buildURL());

    return array($headers, $body);
}

?>