From d9bf22a0e29c2a70049443a0ae8521a2c0492c8b Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sun, 11 Dec 2011 06:38:23 -0500 Subject: initial commit for git repository --- .../examples/server/lib/render/about.php | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 models/openid-php-openid-782224d/examples/server/lib/render/about.php (limited to 'models/openid-php-openid-782224d/examples/server/lib/render/about.php') diff --git a/models/openid-php-openid-782224d/examples/server/lib/render/about.php b/models/openid-php-openid-782224d/examples/server/lib/render/about.php new file mode 100644 index 000000000..53e3694e9 --- /dev/null +++ b/models/openid-php-openid-782224d/examples/server/lib/render/about.php @@ -0,0 +1,47 @@ + +An error occurred when processing your request: +
+%s +'); + +define('about_body', + '

+ This is an OpenID server + endpoint. This server is built on the JanRain PHP OpenID + library. Since OpenID consumer sites will need to directly contact this + server, it must be accessible over the Internet (not behind a firewall). +

+

+ To use this server, you will have to set up a URL to use as an identifier. + Insert the following markup into the <head> of the HTML + document at that URL: +

+
<link rel="openid.server" href="%s" />
+

+ Then configure this server so that you can log in with that URL. +

+'); + +/** + * 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'); +} + +?> \ No newline at end of file -- cgit v1.2.3