mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-17 02:10:02 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5137 201d5d3c-b55e-5fd7-737f-ddc643e51545
58 lines
No EOL
1.9 KiB
PHP
58 lines
No EOL
1.9 KiB
PHP
<?php
|
|
|
|
require_once "lib/session.php";
|
|
require_once "lib/render.php";
|
|
|
|
define('about_error_template',
|
|
'<div class="error">
|
|
An error occurred when processing your request:
|
|
<br />
|
|
%s
|
|
</div>');
|
|
|
|
define('about_body',
|
|
'<p>
|
|
This is an <a href="http://www.openid.net/">OpenID</a> server
|
|
endpoint. This server is built on the <a
|
|
href="http://www.openidenabled.com/openid/libraries/php">JanRain PHP OpenID
|
|
library</a>. Since OpenID consumer sites will need to directly contact this
|
|
server, it must be accessible over the Internet (not behind a firewall).
|
|
</p>
|
|
<p>
|
|
To use this server, you will have to set up a URL to use as an identifier.
|
|
Insert the following markup into the <code><head></code> of the HTML
|
|
document at that URL:
|
|
</p>
|
|
<pre><link rel="openid.server" href="%s" /></pre>
|
|
<p>
|
|
Then configure this server so that you can log in with that URL. Once you
|
|
have configured the server, and marked up your identity URL, you can verify
|
|
that it is working by using the <a href="http://www.openidenabled.com/"
|
|
>openidenabled.com</a>
|
|
<a href="http://www.openidenabled.com/resources/openid-test/checkup">OpenID
|
|
Checkup tool</a>:
|
|
<form method="post"
|
|
action="http://www.openidenabled.com/resources/openid-test/checkup/start">
|
|
<label for="checkup">OpenID URL:
|
|
</label><input id="checkup" type="text" name="openid_url" />
|
|
<input type="submit" value="Check" />
|
|
</form>
|
|
</p>
|
|
');
|
|
|
|
/**
|
|
* Render the about page, potentially with an error message
|
|
*/
|
|
function about_render($error=false, $internal=true)
|
|
{
|
|
$headers = array();
|
|
$body = sprintf(about_body, buildURL());
|
|
if ($error) {
|
|
$headers[] = $internal ? http_internal_error : http_bad_request;
|
|
$body .= sprintf(about_error_template, htmlspecialchars($error));
|
|
}
|
|
$current_user = getLoggedInUser();
|
|
return page_render($body, $current_user, 'OpenID Server Endpoint');
|
|
}
|
|
|
|
?>
|