idpage.php 629 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. require_once "lib/session.php";
  3. require_once "lib/render.php";
  4. define('idpage_pat',
  5. '<html>
  6. <head>
  7. <link rel="openid2.provider openid.server" href="%s"/>
  8. <meta http-equiv="X-XRDS-Location" content="%s" />
  9. </head>
  10. <body>
  11. This is the identity page for users of this server.
  12. </body>
  13. </html>');
  14. function idpage_render($identity)
  15. {
  16. $xrdsurl = buildURL('userXrds')."?user=".urlencode($identity);
  17. $headers = array(
  18. 'X-XRDS-Location: '.$xrdsurl);
  19. $body = sprintf(idpage_pat,
  20. buildURL(),
  21. $xrdsurl);
  22. return array($headers, $body);
  23. }
  24. ?>