diff options
Diffstat (limited to 'models/openid-php-openid-782224d/examples/server/lib/render/idpage.php')
-rw-r--r-- | models/openid-php-openid-782224d/examples/server/lib/render/idpage.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/models/openid-php-openid-782224d/examples/server/lib/render/idpage.php b/models/openid-php-openid-782224d/examples/server/lib/render/idpage.php new file mode 100644 index 000000000..48c2486df --- /dev/null +++ b/models/openid-php-openid-782224d/examples/server/lib/render/idpage.php @@ -0,0 +1,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, + buildURL(), + $xrdsurl); + return array($headers, $body); +} + +?> |