File: idpage.php

package info (click to toggle)
php-openid 2.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 3,284 kB
  • ctags: 6,733
  • sloc: php: 20,482; python: 346; xml: 333; sh: 130; perl: 103; makefile: 31
file content (31 lines) | stat: -rw-r--r-- 628 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php

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

define('idpage_pat',
       '<html>
<head>
  <link rel="openid2.provider openid.server" href="%s"/>
  <meta http-equiv="X-XRDS-Location" content="%s" />
</head>
<body>
  This is the identity page for users of this server.
</body>
</html>');

function idpage_render($identity)
{
    $xrdsurl = buildURL('userXrds')."?user=".urlencode($identity);

    $headers = array(
                     'X-XRDS-Location: '.$xrdsurl);


    $body = sprintf(idpage_pat,
                    $xrdsurl,
                    buildURL());
    return array($headers, $body);
}

?>