about page
authorChristian Weiske <cweiske@cweiske.de>
Fri, 5 Jun 2015 05:49:05 +0000 (07:49 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Fri, 5 Jun 2015 05:49:05 +0000 (07:49 +0200)
www/about.php [new file with mode: 0644]
www/index.php

diff --git a/www/about.php b/www/about.php
new file mode 100644 (file)
index 0000000..425b23a
--- /dev/null
@@ -0,0 +1,70 @@
+<?php
+if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']) {
+    $prot = 'https';
+} else {
+    $prot = 'http';
+}
+$epUrl  = $prot . '://' . $_SERVER['HTTP_HOST'] . '/';
+$hepUrl = htmlspecialchars($epUrl);
+
+?>
+<?xml version="1.0" encoding="utf-8"?>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>IndieAuth-OpenID proxy</title>
+  <style type="text/css">
+body {
+    max-width: 80ex;
+    margin-left: auto;
+    margin-right: auto;
+}
+pre {
+    margin-left: 2ex;
+    background-color: #DDD;
+    padding: 1ex;
+    border-radius: 1ex;
+}
+tt {
+    background-color: #DDD;
+    padding: 0.2ex 0.5ex;
+}
+  </style>
+
+ </head>
+ <body>
+  <h1>IndieAuth to OpenID proxy</h1>
+  <p>
+   This software make it possible to use your OpenID to login
+   to IndieAuth-enabled websites.
+  </p>
+
+
+  <h2 id="setup">Setup</h2>
+  <p>
+   On your home page, add the following code to the
+   HTML <tt>&lt;head&gt;</tt> section:
+  </p>
+  <pre>&lt;link rel="authorization_endpoint" href="<?php echo $hepUrl; ?>" /&gt;</pre>
+  <p>
+   Now simply enter your homepage URL in the IndieAuth login field
+   and press return.
+   You'll be redirected to your OpenID provider and see its login prompt.
+  </p>
+
+  
+  <h2 id="source">About indieauth-openid</h2>
+  <p>
+   <em>indieauth-openid</em> was written by
+   <a href="http://cweiske.de/">Christian Weiske</a>
+   and is licensed under the
+   <a href="http://www.gnu.org/licenses/agpl.html">AGPL v3 or later</a>.
+  </p>
+  <p>
+   You can get the source code from
+   <a href="http://git.cweiske.de/indieauth-openid.git">git.cweiske.de/indieauth-openid.git</a>
+   or the
+   <a href="https://github.com/cweiske/indieauth-openid">mirror on Github</a>.
+  </p>
+
+ </body>
+</html>
index c3b7848..de410c1 100644 (file)
  * @link    http://indiewebcamp.com/auth-brainstorming
  * @link    https://indieauth.com/developers
  */
+if (($_SERVER['REQUEST_METHOD'] == 'GET' || $_SERVER['REQUEST_METHOD'] == 'HEAD')
+    && count($_GET) == 0
+) {
+    include 'about.php';
+    exit();
+}
 
 require_once 'Net/URL2.php';
 require_once 'OpenID.php';