Bladeren bron

Move Poidsy website to gh-pages

gh-pages
Chris Smith 9 jaren geleden
commit
1d0864aaa1
13 gewijzigde bestanden met toevoegingen van 741 en 0 verwijderingen
  1. 165
    0
      changelog.html
  2. 65
    0
      index.html
  3. 328
    0
      instructions.html
  4. BIN
      openid.png
  5. BIN
      poidsy-0.1.tgz
  6. BIN
      poidsy-0.2.tgz
  7. BIN
      poidsy-0.3.tgz
  8. BIN
      poidsy-0.4.tgz
  9. BIN
      poidsy-0.5.tgz
  10. BIN
      poidsy-0.6.tgz
  11. 27
    0
      prettify.css
  12. 29
    0
      prettify.js
  13. 127
    0
      style.css

+ 165
- 0
changelog.html Bestand weergeven

@@ -0,0 +1,165 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
+<html>
3
+ <head>
4
+  <title>Poidsy - A PHP OpenID Consumer - Changelog</title>
5
+  <link rel="stylesheet" href="style.css" type="text/css">
6
+ </head>
7
+ <body>
8
+  <h1><img src="openid.png" alt="OpenID logo"> Poidsy <small>A PHP OpenID Consumer</small></h1>
9
+  <ul id="menu">
10
+   <li><a href="index.html">Home</a></li>
11
+   <li><a href="instructions.html">Instructions</a></li>
12
+   <li><a href="changelog.html">Changelog</a></li>
13
+  </ul>
14
+  <div class="left">
15
+   <h2 class="first">Changelog</h2>
16
+   <h3 id="6">0.6 &rarr; 0.7</h3>
17
+   <ul>
18
+    <li>Disable logging by default</li>
19
+    <li>Fix error when logging from within methods which take objects or arrays as arguments (thanks to Erik Johnson for the bug report)</li>
20
+    <li>Fix incorrect detection of HTTPS in some cases (thanks to Liam for the bug report)</li>
21
+    <li>Fixed a potential timer attack vulnerability</li>
22
+    <li>Fixed errors when handling a revocation (thanks to Daniele Venzano for the bug report)</li>
23
+   </ul>
24
+   <h3 id="5">0.5 &rarr; 0.6</h3>
25
+   <ul>
26
+    <li>After a successful login, the 'brute force' counter is now reduced by one</li>
27
+    <li>Added logging functionality to assist in debugging</li>
28
+    <li>Change "gmail.com" to full URL in basic example, as XRDS discovery only seems to work on the latter now</li>
29
+    <li>Fixed problem where claimed ID/identity/delegate were being set the wrong way around, causing incompatibility with some providers such as signon.com (thanks to Huma Javed for the bug report)</li>
30
+    <li>Added check for allow_url_fopen to test.php (thanks to Lyceuhns for bringing this up)</li>
31
+    <li>Discoverer now correctly handles &lt;link/&gt; elements that contain multiple entries in their 'rel' attributes</li>
32
+    <li>Discoverer now takes redirections into account when performing Yadis discovery, fixes compatibility with signon.com</li>
33
+    <li>Discoverer now allows html discovery when checking an identity provided by an OP, fixes compatibility with flickr.com</li>
34
+    <li>Responses from IdPs sent with HTTP error codes are now still processed by Poidsy</li>
35
+    <li>Poidsy now supports IdPs saying they don't support a certain association or session type, and will try to accomodate them</li>
36
+    <li>Poidsy now correctly validates the return_to URL provided by IdPs</li>
37
+    <li>Fix potential bug when using Poidsy over HTTPS on a port other than 80</li>
38
+    <li>Poidsy now correctly validates the claimed_id (OpenID 2.0) or identity (OpenID 1.1) returned by IdPs</li>
39
+    <li>Decoupled simple registration extension &mdash; to use this you must now include <tt>sreg.ext.php</tt> before including Poidsy's processor</li>
40
+    <li>Repurposed <tt>SREG_*</tt> constants so they can be used when defining <tt>OPENID_SREG_*</tt> settings</li>
41
+    <li>Added support for Attribute Exchange extension</li>
42
+   </ul>
43
+   <h3 id="4">0.4 &rarr; 0.5</h3>
44
+   <ul>
45
+    <li>Diffie-Hellman encrypted keys are now decrypted when they're received, rather than every time that they're used</li>
46
+    <li>Fixed the Discoverer raising E_NOTICE errors in some cases</li>
47
+    <li>Documented all methods of the KeyManager class</li>
48
+    <li>Further refactoring and tidying of request processor</li>
49
+    <li>Renamed some methods of the KeyManager class to use better terminology</li>
50
+    <li>The trust_root URL will now be truncated to contain the return_to URL (thanks to Bernd Eckenfels for the bug report)</li>
51
+    <li>Added support for Yadis discovery</li>
52
+    <li>Fixed E_NOTICE errors when receiving SREG information</li>
53
+    <li>Clarify reasons why checkid_immediate might not work properly in the JavaScript example</li>
54
+    <li>Added support for sending the correct OpenID 2.0 namespace parameter when discovery indicates the end point supports 2.0</li>
55
+    <li>Fixed E_NOTICE errors when POSTing to an URL failed for any reason</li>
56
+    <li>Requests to OpenID 2.0 end points now send openid.realm not openid.trust_root</li>
57
+    <li>Support for OpenID 2.0 identifier selection</li>
58
+    <li>OpenID 1.x requests no longer send an openid.ns parameter (fixes errors when using Blogger accounts)</li>
59
+    <li>Added Google and Yahoo shortcuts to the basic example</li>
60
+    <li>The discovery agent now tracks all servers and services it's told about</li>
61
+   </ul>
62
+   <h3 id="3">0.3 &rarr; 0.4</h3>
63
+   <ul>
64
+    <li>Added support for HMAC-SHA256 association type</li>
65
+    <li>The processor will now accept $_POST['openid_identifier'] if $_POST['openid_url'] is not set (and OPENID_URL is not defined)</li>
66
+    <li>Added support for discovery via openid2.provider and openid2.local_id links</li>
67
+    <li>Abstracted dumb authorisation procedure into KeyManager</li>
68
+    <li>Removed autherror error code (all authorisation errors are now "noauth")</li>
69
+    <li>Messages instructing Poidsy to invalidate an association handle are now 
70
+    authenticated with the provider before the handle is actually invalidated.</li>
71
+    <li>Poidsy now sends the openid.claimed_id argument to identity providers</li>
72
+    <li>Changed the behaviour of OPENID_IMMEDIATE. If the constant is defined, 
73
+    an immediate request will be attempted first (as before). If the constant is
74
+    true, then Poidsy will fail if the provider requires setup (for use in
75
+    "AJAX"-like applications). If the constant is false, Poidsy will continue
76
+    on to a setup request as it did in 0.2 and earlier.</li>
77
+    <li>Fix bug in discovery engine which could be used to authenticate illegal,
78
+    fake identifiers.</li>
79
+    <li>Add support for Diffie-Hellman key exchange (DH-SHA1 and DH-SHA256 session types)</li>
80
+    <li>Fixed wrong session_type being sent due to misreading of the specs</li>
81
+    <li>Refactoring and general tidying of the main request processor</li>
82
+   </ul>
83
+   <h3 id="2">0.2 &rarr; 0.3</h3>
84
+   <ul>
85
+    <li>Added support for the Simple Registration Extension</li>
86
+    <li>Updated demo to request and display SREG fields</li>
87
+    <li>Added keymanager library and keycache file</li>
88
+    <li>Poidsy now supports associate mode, and uses it by default</li>
89
+    <li>Added compatibility test script</li>
90
+    <li>Poidsy now passes openid.ns in all requests</li>
91
+    <li>Poidsy will no longer send an initial checkid_immediate request unless
92
+    OPENID_IMMEDIATE is defined</li>
93
+    <li>Moved the demo.php file into examples/basic/</li>
94
+    <li>Poidsy now always passes the trust_root argument as some providers break
95
+    without it. By default it is sent as the current URL, but can be overridden
96
+    using the OPENID_TRUSTROOT constant</li>
97
+    <li>HTML entities are now handled properly when discovering identity provider
98
+    URLs</li>
99
+    <li>The URL normaliser has been improved to prevent people expressing the same
100
+    identity in multiple ways. Changes include:
101
+     <ul>
102
+      <li>Usernames (and passwords) are now stripped unless OPENID_ALLOWUSER is set</li>
103
+      <li>Queries are now stripped unless OPENID_ALLOWQUERY is set</li>
104
+      <li>Empty and default ports are now stripped</li>
105
+      <li>Trailing full stops are now stripped from domain names</li>
106
+      <li>/./ and /../ in paths are now collapsed</li>
107
+     </ul>
108
+    </li>
109
+    <li>Added a new example that uses JavaScript and a hidden iframe</li>
110
+    <li>Added error codes &mdash; whenever an error is encountered
111
+    $_SESSION['openid']['errorcode'] is now populated with a short string
112
+    identifying the problem. This is to allow implementors to perform different
113
+    actions on certain errors, or to localise the error messages.</li>
114
+    <li>Fixed minor bug in URL builder that lead to an extra ampersand in URLs
115
+    in some cases</li>
116
+    <li>The discovery engine can now specify the version of the data it has recovered</li>
117
+   </ul>
118
+   <h3 id="1">0.1 &rarr; 0.2</h3>
119
+   <ul>
120
+    <li>Added version and link to the top of the license header in each file</li>
121
+    <li>The processor now catches exceptions thrown by the discovery agent</li>
122
+    <li>The processor now catches exceptions thrown when trying to POST data to
123
+    the provider</li>
124
+    <li>The identity returned by the identity provider is now checked against the
125
+    identity that poidsy was trying to validate</li>
126
+    <li>The processor no longer requires that openid_url be present in $_REQUEST
127
+    as well as $_POST</li>
128
+    <li>The URL can now be passed to the processor using the OPENID_URL constant,
129
+    instead of as a POST var</li>
130
+    <li>Wrapped most lines in processor.php to be less than 80 characters long</li>
131
+    <li>Added lots of comments to the demonstration consumer explaining what's happening</li>
132
+    <li>Return URLs now have a 'nonce' added to them that's checked against the
133
+    user's session. This prevents request replay attacks.</li>
134
+    <li>Improved detection of the URL that user should be redirected to. Poidsy
135
+    now preserves all non-OpenID GET arguments.</li>
136
+    <li>Added throttling to prevent malicious users from using Poidsy to launch
137
+    a DoS attack against a remote site.</li>
138
+    <li>Poidsy is now aware of HTTP redirects when trying to discover the OpenID
139
+    server, and updates the identity accordingly. This prevents people from
140
+    "stealing" URLs that redirect to their own site</li>
141
+    <li>The URL normaliser now adds a trailing forward-slash if one isn't included</li>
142
+   </ul>
143
+  </div>
144
+  <div class="right">
145
+   <h2 class="first">Contents</h2>
146
+   <ul>
147
+    <li><a href="#1">0.1 &rarr; 0.2</a></li>
148
+    <li><a href="#2">0.2 &rarr; 0.3</a></li>
149
+    <li><a href="#3">0.3 &rarr; 0.4</a></li>
150
+    <li><a href="#4">0.4 &rarr; 0.5</a></li>
151
+    <li><a href="#5">0.5 &rarr; 0.6</a></li>
152
+    <li><a href="#6">0.6 &rarr; 0.7</a></li>
153
+   </ul>
154
+   <h2>Downloads</h2>
155
+   <ul>
156
+    <li><a href="poidsy-0.6.tgz">poidsy-0.6.tgz</a> (23K)</li>
157
+    <li><a href="poidsy-0.5.tgz">poidsy-0.5.tgz</a> (18K)</li>
158
+    <li><a href="poidsy-0.4.tgz">poidsy-0.4.tgz</a> (14K)</li>
159
+    <li><a href="poidsy-0.3.tgz">poidsy-0.3.tgz</a> (9.9K)</li>
160
+    <li><a href="poidsy-0.2.tgz">poidsy-0.2.tgz</a> (5.7K)</li>
161
+    <li><a href="poidsy-0.1.tgz">poidsy-0.1.tgz</a> (3.9K)</li>
162
+   </ul>
163
+  </div>
164
+ </body>
165
+</html>

+ 65
- 0
index.html Bestand weergeven

@@ -0,0 +1,65 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
+<html>
3
+ <head>
4
+  <title>Poidsy - A PHP OpenID Consumer</title>
5
+  <link rel="stylesheet" href="style.css" type="text/css">
6
+ </head>
7
+ <body>
8
+  <h1><img src="openid.png" alt="OpenID logo"> Poidsy <small>A PHP OpenID Consumer</small></h1>
9
+  <ul id="menu">
10
+   <li><a href="index.html">Home</a></li>
11
+   <li><a href="instructions.html">Instructions</a></li>
12
+   <li><a href="changelog.html">Changelog</a></li>
13
+  </ul>
14
+  <div class="left">
15
+  <h2 class="first">Background</h2>
16
+  <p>
17
+   <em>Poidsy</em> is a set of PHP scripts
18
+   that serve as an OpenID consumer. OpenID consumers allow users to authenticate
19
+   themselves with an OpenID identifier. For more information about OpenID, see
20
+   <a href="http://openid.net/">openid.net</a>.
21
+  </p>
22
+  <p>
23
+   At the time of writing, there were several consumer "libraries" available
24
+   for PHP developers. From what I saw of them, they all exposed far too much
25
+   of the OpenID logic to the implementor for my liking &mdash; you pretty much
26
+   needed to build your own consumer using their libraries, rather than simply
27
+   using a pre-made one.
28
+  </p>
29
+  <h2>Use it</h2>
30
+  <p>
31
+   The current version of Poidsy is <em>0.6</em>. At this stage, Poidsy has
32
+   support for both OpenID 1.x and 2.x, as well as a couple of extensions
33
+   to those. If you encounter any providers that do not work with
34
+   Poidsy, please <a href="http://chris.smith.name/">contact me</a>.
35
+  </p>
36
+  <p>
37
+   You can download the consumer here:
38
+   <a href="poidsy-0.6.tgz">poidsy-0.6.tgz</a> (18KB) | <a href="changelog.html">Changelog</a>
39
+  </p>
40
+  <p><a href="instructions.html">Instructions</a> for integrating Poidsy with an
41
+     existing login script are available.</p>
42
+  </div>
43
+  <div class="right">
44
+  <h2 class="first">Feedback</h2>
45
+  <p>
46
+   If you're using Poidsy (or are trying to but are having
47
+   problems) then I'd love to hear from you. My contact details can be found
48
+   on my <a href="http://chris.smith.name/" rel="me">personal website</a>.
49
+  </p>
50
+  <h2>Sites</h2>
51
+  <p>
52
+   The following sites allow OpenID authentication using Poidsy:
53
+  </p>
54
+  <ul>
55
+   <li><a href="http://apsps.MD87.co.uk/quotes/">Quote DB</a></li>
56
+   <li><a href="http://addons.dmdirc.com/">DMDirc addons site</a></li>
57
+   <li><a href="http://www.zipplet.co.uk/">Zipplet's Stuff</a> *</li>
58
+   <li><a href="http://home.dataforce.org.uk/">Home.Dataforce.org.uk</a> *</li>
59
+  </ul>
60
+  <div id="footnote">
61
+   * via a third-party <abbr title="single sign on">sso</abbr> service
62
+  </div>
63
+  </div>
64
+ </body>
65
+</html>

+ 328
- 0
instructions.html Bestand weergeven

@@ -0,0 +1,328 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
+<html>
3
+ <head>
4
+  <title>Poidsy - A PHP OpenID Consumer</title>
5
+  <link rel="stylesheet" href="style.css" type="text/css">
6
+  <link href="prettify.css" type="text/css" rel="stylesheet">
7
+  <script type="text/javascript" src="prettify.js"></script>
8
+ </head>
9
+ <body onLoad="prettyPrint();">
10
+  <h1><img src="openid.png" alt="OpenID logo"> Poidsy <small>A PHP OpenID Consumer</small></h1>
11
+  <ul id="menu">
12
+   <li><a href="index.html">Home</a></li>
13
+   <li><a href="instructions.html">Instructions</a></li>
14
+   <li><a href="changelog.html">Changelog</a></li>
15
+  </ul>
16
+  <div class="left">
17
+   <h2 class="first">Background Information</h2>
18
+   <p>
19
+    Poidsy is designed to be both easy to use and easy to integrate with
20
+    existing systems. This document explains the developer's interface to
21
+    Poidsy, and works through modifying a basic authentication script
22
+    to accept OpenID logins with Poidsy.
23
+   </p>
24
+   <h3>Requirements</h3>
25
+   <p>
26
+    Before you begin using Poidsy, you need to check that your environment
27
+    is supported. The easiest way to do this is to download a release of
28
+    Poidsy, and view the included test.php file in your web browser. This will
29
+    tell you about any problems it has encountered, and what will/will not work
30
+    as a result.
31
+   </p>
32
+   <h3>How it works</h3>
33
+   <p>
34
+    The bulk of the work done by Poidsy is done by the <code>processor.php</code>
35
+    script. This is the file that you will be including into your login page.
36
+   </p>
37
+   <p>
38
+    The processor is designed to be invoked in response to a form submission.
39
+    At present (version 0.1), it requires that <code>$_POST['openid_url']</code> is set to
40
+    the user-supplied identifier.
41
+   </p>
42
+   <p>
43
+    Once the processor has finished authenticating (or rejecting) the user's
44
+    identifier, it will supply the details in a session variable. Thus, to
45
+    actually make use of Poidsy's results, you will need to call
46
+    <code>session_start()</code> on your login page (if you're not already).
47
+   </p>
48
+   <p>
49
+    While Poidsy is authenticating an identifier, the user may be redirected
50
+    between the login page and their identity provider a number of times.
51
+    Whenever the user is redirected to the login page during this process,
52
+    the <code>openid.mode</code> parameter will be present.
53
+   </p>
54
+   <h2>Adding OpenID support to an existing login form</h2>
55
+   <p>
56
+    This example will walk through adding Poidsy to an existing login form.
57
+    The system we'll be modifying currently deals with usernames and passwords.
58
+    It is assumed that the Poidsy files are extracted to a <code>poidsy</code>
59
+    directory in the same directory as the login file.
60
+   </p>
61
+   <p>
62
+    The example code that we'll be modifying is included below. For the sake
63
+    of brevity, the specific logic of finding users, checking passwords, and
64
+    actually logging them in is abstracted away.
65
+   </p>
66
+<code class="prettyprint"> &lt;?PHP
67
+
68
+ if (isset($_POST['user']) &amp;&amp; isset($_POST['pass'])) {
69
+  if (passwordMatches($_POST['user'], hashPassword($_POST['pass']))) {
70
+   setUser($_POST['user']);
71
+   redirectAndExit();
72
+  } else {
73
+   define('ERROR', 'Invalid username/password combination');
74
+  }
75
+ }
76
+
77
+ if (defined('ERROR')) {
78
+  echo '&lt;div class="error"&gt;ERROR: ', htmlentities(ERROR), '&lt;/div&gt;';
79
+ }
80
+
81
+?&gt;
82
+&lt;p&gt;Enter your details below to login:&lt;/p&gt;
83
+&lt;form action="login.php" method="post"&gt;
84
+ &lt;label&gt;Username: &lt;input type="text" name="user"&gt;&lt;/label&gt;
85
+ &lt;label&gt;Password: &lt;input type="password" name="pass"&gt;&lt;/label&gt;
86
+ &lt;input type="submit" value="Login"&gt;
87
+&lt;/form&gt;
88
+</code>
89
+   <h3>Step 1: Adding a new form</h3>
90
+   <p>
91
+    The first step is to provide users with a second form to enter their
92
+    OpenID identifier in. It's good practice to include a little OpenID
93
+    logo in the input field, so users can instantly see that it's for an
94
+    OpenID identifier. Poidsy handily comes with such a logo.
95
+   </p>
96
+   <p>
97
+    The following code is added below the existing form:
98
+   </p>
99
+<code class="prettyprint">&lt;p&gt;Alternatively, login using an OpenID identifier:&lt;/p&gt;
100
+&lt;form action="login.php" method="post"&gt;
101
+ &lt;input type="text" name="openid_url"
102
+        style="background-image: url('poidsy/openid.gif') no-repeat;
103
+               padding-left: 20px;"&gt;
104
+ &lt;input type="submit" value="Login"&gt;
105
+&lt;/form&gt;
106
+</code>
107
+   <h3>Step 2: Starting a session</h3>
108
+   <p>
109
+    As described above, Poidsy uses sessions to track data and return its
110
+    results. As our login form currently doesn't use sessions, we need to
111
+    add a call to <code>session_start();</code> before we'll be using
112
+    Poidsy or its results.
113
+   </p>
114
+   <p>
115
+    The session start code therefore needs to be added before the main if statement.
116
+   </p>
117
+<code class="prettyprint"><span style="opacity: 0.5;">&lt;?PHP</span>
118
+
119
+ session_start();
120
+
121
+<span style="opacity: 0.5;"> if (isset($_POST['user']) &amp;&amp; isset($_POST['pass'])) {</span>
122
+</code>
123
+   <h3>Step 3: Including the processor</h3>
124
+   <p>
125
+    The next step is to include Poidsy's processor when there's processing to be
126
+    done. This is either when the user has just submitted the OpenID form, or
127
+    when they've been redirected back from their provider during the
128
+    authentication process.
129
+   </p>
130
+   <p>
131
+    We prepend the following conditions to the start of the if statement to
132
+    include the processor when neccessary. Note that PHP translates the
133
+    openid.mode argument to openid_mode.
134
+   </p>
135
+<code class="prettyprint"><span style="opacity: 0.5;"> session_start(); </span>
136
+
137
+ if (isset($_POST['openid_url']) || isset($_REQUEST['openid_mode'])) {
138
+
139
+  // OpenID login attempt
140
+  require('poidsy/processor.php');
141
+
142
+ } else <span style="opacity: 0.5;">if (isset($_POST['user']) &amp;&amp; isset($_POST['pass'])) {</span>
143
+</code>
144
+   <h3>Step 4: Handling errors</h3>
145
+   <p>
146
+    Just like normal login attempts, OpenID authentications can fail for a
147
+    variety of reasons (such as the identifier not being a valid OpenID
148
+    endpoint, or the provide refusing to authenticate the client), so we
149
+    need to handle errors and display them to the user.
150
+   </p>
151
+   <p>
152
+    If an error is encountered, Poidsy will have set the
153
+    <code>$_SESSION['openid']['error']</code> variable with a description
154
+    of the problem. We simply check for this and pass it on to the user:
155
+   </p>
156
+<code class="prettyprint"><span style="opacity:0.5;">require('poidsy/processor.php');</span>
157
+
158
+ } else if (isset($_SESSION['openid']['error'])) {
159
+
160
+  // Failed OpenID login attempt
161
+  define('ERROR', $_SESSION['openid']['error']);
162
+  unset($_SESSION['openid']['error']);
163
+
164
+ <span style="opacity: 0.5;">} else if (isset($_POST['user']) &amp;&amp; isset($_POST['pass'])) {</span>
165
+</code>
166
+   <h3>Step 5: Handling success</h3>
167
+   <p>
168
+    The final thing to do is to handle the case when a user has successfully
169
+    authenticated themselves using an OpenID identifier. In a typical
170
+    environment this will be a two-step process: creating a new account for
171
+    the user if they haven't previously logged in, and then logging the user
172
+    in to their account.
173
+   </p>
174
+   <p>
175
+    The following code adds another branch to our if statement:
176
+   </p>
177
+<code class="prettyprint"><span style="opacity:0.5;">unset($_SESSION['openid']['error']);</span>
178
+
179
+ } else if (isset($_SESSION['openid']['validated']) &amp;&amp; $_SESSION['openid']['validated']) {
180
+
181
+  // OpenID authentication successful
182
+
183
+  if (!isAccount($_SESSION['openid']['identity'])) {
184
+
185
+   // Create an account if they need one, using a fake
186
+   // password hash so users can't login normally
187
+   createAccount($_SESSION['openid']['identity'], 'invalid'):
188
+
189
+  }
190
+
191
+  setUser($_SESSION['openid']['identity']);
192
+  unset($_SESSION['openid']['validated']);
193
+  redirectAndExit();
194
+
195
+ <span style="opacity: 0.5;">} else if (isset($_POST['user']) &amp;&amp; isset($_POST['pass'])) {</span>
196
+</code>
197
+   <h2>Summary</h2>
198
+   <p>
199
+    Hopefully this document has given you a sense of how to use Poidsy.
200
+    It is designed to work transparently with your existing applications,
201
+    and as demonstrated above can be integrated in five simple steps.
202
+   </p>
203
+   <p>
204
+    Note that, of course, how you implement Poidsy very much depends on
205
+    your existing system and your requirements. If you are going to switch
206
+    to using just OpenID, there is obviously no need to deal with
207
+    password hashes as was done in this example, and you could in fact
208
+    not use a backend database at all for your users &mdash; just rely on
209
+    Poidsy to populate the $_SESSION['openid'] array.
210
+   </p>
211
+  </div>
212
+  <div class="right">
213
+  <h2 class="first">Feedback</h2>
214
+  <p>
215
+   If you're using Poidsy (or are trying to but are having
216
+   problems) then I'd love to hear from you. My contact details can be found
217
+   on my <a href="http://chris.smith.name/" rel="me">personal website</a>.
218
+  </p>
219
+  <h2>Constant reference</h2>
220
+  <p>
221
+   You can define a set of constants to control the behaviour of
222
+   Poidsy. These should be defined before the processor is included.
223
+  </p>
224
+  <p class="asof">From Poidsy 0.1:</p>
225
+  <dl>
226
+   <dt>OPENID_URL</dt>
227
+   <dd>
228
+    The user-supplied OpenID URL to validate. This should only be specified
229
+    for the initial request (not any subsequent redirects where openid.mode is
230
+    set). If not provided, Poidsy will use the value of $_POST['openid_url'] if it exists
231
+   </dd>
232
+  </dl>
233
+  <p class="asof">From Poidsy 0.2:</p>
234
+  <dl>
235
+   <dt>OPENID_THROTTLE_NUM</dt>
236
+   <dd>
237
+    The maximum number of requests to allow before throttling a user.
238
+    Default value is 3.
239
+   </dd>
240
+   <dt>OPENID_THROTTLE_GAP</dt>
241
+   <dd>
242
+    The number of seconds that have to ellapse between requests before the
243
+    user's counter is reset. Default value is 30.
244
+   </dd>
245
+  </dl>
246
+  <p class="asof">From Poidsy 0.3:</p>
247
+  <dl>
248
+   <dt>OPENID_SREG_REQUEST</dt>
249
+   <dd>
250
+    A comma-separated list of fields to request from the user via the simple
251
+    registration extension. Use of this constant implies that the user will
252
+    be required to manually input the data if their provider doesn't supply it.
253
+   </dd>
254
+   <dt>OPENID_SREG_OPTIONAL</dt>
255
+   <dd>
256
+    A comma-separated list of fields that the user's provider may provide, but
257
+    aren't required by the application.
258
+   </dd>
259
+   <dt>OPENID_SREG_POLICY</dt>
260
+   <dd>
261
+    An URL for a document that describes how the data requested using SREG is
262
+    going to be used.
263
+   </dd>
264
+   <dt>OPENID_NOKEYMANAGER</dt>
265
+   <dd>
266
+    Stops Poidsy using its key manager, forcing it to use dumb mode instead.
267
+    The value of the constant is irrelevant, only whether it is defined or not.
268
+   </dd>
269
+   <dt>OPENID_IMMEDIATE</dt>
270
+   <dd>
271
+    Forces Poidsy to try an openid_immediate request first. If not defined,
272
+    Poidsy will send an openid_setup request, which allows the identity provider
273
+    to interact with the user.</dd><dd>As of 0.4, if this is set to <code>true</code>,
274
+    Poidsy will error if the provider requires interaction, otherwise Poidsy
275
+    will send a setup request. Previous behaviour always errored.
276
+   </dd>
277
+   <dt>OPENID_TRUSTROOT</dt>
278
+   <dd>
279
+    The trust root to send to providers. Used to tell users what site they're
280
+    logging into. Should be a fully qualified URL that encompasses the URL of
281
+    the login script. Defaults to the current URL. </dd><dd>As of 0.5, this may 
282
+    be truncated in order to ensure it is above the return_to URL.
283
+   </dd>
284
+   <dt>OPENID_ALLOWUSER</dt>
285
+   <dd>
286
+    If defined, allows usernames (and passwords) in identity URLs. These are
287
+    stripped by default to prevent users using the same identity with multiple
288
+    (bogus, unused) usernames.
289
+   </dd>
290
+   <dt>OPENID_ALLOWQUERY</dt>
291
+   <dd>
292
+    If defined, allows queries (the part of the URL after the "?" character) in
293
+    identity URLs. These are stripped by default to prevent users from using
294
+    the same identity with multiple (unused) query strings.
295
+   </dd>
296
+  </dl>
297
+  <h2>Error codes</h2>
298
+  <p>
299
+   As of Poidsy 0.3, each error has an associated errorcode that defines
300
+   the type of error. These error codes are:
301
+  </p>
302
+  <dl>
303
+   <dt style="text-decoration: line-through;">autherror</dt>
304
+   <dd>Error when trying to POST data to authenticate a request in dumb mode, probably because the provider went down. Removed as of Poidsy 0.4.</dd>
305
+   <dt>cancelled</dt>
306
+   <dd>The user or their identity provider cancelled the request for some reason</dd>
307
+   <dt>diffid</dt>
308
+   <dd>The provider validated a different identity to the one Poidsy requested. Indicates that the provider is probably broken.</dd>
309
+   <dt>diffreturnto</dt>
310
+   <dd>The provider gave a different return_to URL to the one the user arrived at</dd>
311
+   <dt>discovery</dt>
312
+   <dd>There was an error during discovery (site down, unsupported protocol, etc)</dd>
313
+   <dt>noauth</dt>
314
+   <dd>The signature of the provider's response didn't match the response. This could mean that something is broken, or that someone is trying one of a variety of attacks.</dd>
315
+   <dt>noimmediate</dt>
316
+   <dd>OPENID_IMMEDIATE was defined but the request couldn't be completed immediately</dd>
317
+   <dt>nonce</dt>
318
+   <dd>The nonce used by Poidsy didn't match what it was expecting. This normally means the user tried to go to an expired page, or someone was trying to perform a replay attack.</dd>
319
+   <dt>notvalid</dt>
320
+   <dd>The identity isn't valid (no openid.server link found)</dd>
321
+   <dt>perror</dt>
322
+   <dd>The provider returned an error at some stage</dd>
323
+   <dt>throttled</dt>
324
+   <dd>The user is being throttled by Poidsy. See the description of the OPENID_THROTTLE constants above.</dd>
325
+  </dl>
326
+  </div>
327
+ </body>
328
+</html>

BIN
openid.png Bestand weergeven


BIN
poidsy-0.1.tgz Bestand weergeven


BIN
poidsy-0.2.tgz Bestand weergeven


BIN
poidsy-0.3.tgz Bestand weergeven


BIN
poidsy-0.4.tgz Bestand weergeven


BIN
poidsy-0.5.tgz Bestand weergeven


BIN
poidsy-0.6.tgz Bestand weergeven


+ 27
- 0
prettify.css Bestand weergeven

@@ -0,0 +1,27 @@
1
+/* Pretty printing styles. Used with prettify.js. */
2
+
3
+.str { color: #080; }
4
+.kwd { color: #008; }
5
+.com { color: #800; }
6
+.typ { color: #606; }
7
+.lit { color: #066; }
8
+.pun { color: #660; }
9
+.pln { color: #000; }
10
+.tag { color: #008; }
11
+.atn { color: #606; }
12
+.atv { color: #080; }
13
+.dec { color: #606; }
14
+.prettyprint { display: block; padding: 2px; border: 1px solid #888; }
15
+
16
+@media print {
17
+  .str { color: #060; }
18
+  .kwd { color: #006; font-weight: bold; }
19
+  .com { color: #600; font-style: italic; }
20
+  .typ { color: #404; font-weight: bold; }
21
+  .lit { color: #044; }
22
+  .pun { color: #440; }
23
+  .pln { color: #000; }
24
+  .tag { color: #006; font-weight: bold; }
25
+  .atn { color: #404; }
26
+  .atv { color: #060; }
27
+}

+ 29
- 0
prettify.js Bestand weergeven

@@ -0,0 +1,29 @@
1
+// See http://code.google.com/p/google-code-prettify/
2
+(function () { 
3
+var F={};(function(){var b=["abstract bool break case catch char class const const_cast continue default delete deprecated dllexport dllimport do double dynamic_cast else enum explicit extern false float for friend goto if inline int long mutable naked namespace new noinline noreturn nothrow novtable operator private property protected public register reinterpret_cast return selectany short signed sizeof static static_cast struct switch template this thread throw true try typedef typeid typename union unsigned using declaration, directive uuid virtual void volatile while typeof",
4
+"as base by byte checked decimal delegate descending event finally fixed foreach from group implicit in interface internal into is lock null object out override orderby params readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var","package synchronized boolean implements import throws instanceof transient extends final strictfp native super","debugger export function with NaN Infinity","require sub unless until use elsif BEGIN END","and assert def del elif except exec global lambda not or pass print raise yield False True None",
5
+"then end begin rescue ensure module when undef next redo retry alias defined","done fi"];for(var c=0;c<b.length;c++){var a=b[c].split(" ");for(var d=0;d<a.length;d++){if(a[d]){F[a[d]]=true}}}}).call(this);function r(b,c){if(undefined===c){throw new Error("BAD");}if("number"!=typeof b){throw new Error("BAD");}this.end=b;this.style=c}r.prototype.toString=function(){return"[PR_TokenEnd "+this.end+(this.style?":"+this.style:"")+"]"};function q(b,c){if(undefined===c){throw new Error("BAD");}this.token=
6
+b;this.style=c}q.prototype.toString=function(){return"[PR_Token "+this.token+(this.style?":"+this.style:"")+"]"};function u(){this.next=0;this.ch="\u0000"}var J={lt:"<",gt:">",quot:'"',apos:"'",amp:"&"};u.prototype.decode=function(b,c){var a=c+1,d=b.charAt(c);if("&"===d){var f=b.indexOf(";",a);if(f>=0&&f<a+4){var h=b.substring(a,f),i=null;if(h.charAt(0)==="#"){var e=h.charAt(1),g;if(e==="x"||e==="X"){g=parseInt(h.substring(2),16)}else{g=parseInt(h.substring(1),10)}if(!isNaN(g)){i=String.fromCharCode(g)}}if(!i){i=
7
+J[h.toLowerCase()]}if(i){d=i;a=f+1}else{a=c+1;d="\u0000"}}}this.next=a;this.ch=d;return this.ch};function x(b){return b>="a"&&b<="z"||b>="A"&&b<="Z"}function z(b){return x(b)||b=="_"||b=="$"||b=="@"}function s(b){return"\t \r\n".indexOf(b)>=0}function w(b){return b>="0"&&b<="9"}function I(b){var c=0,a=b.length-1;while(c<=a&&s(b.charAt(c))){++c}while(a>c&&s(b.charAt(a))){--a}return b.substring(c,a+1)}function y(b,c){return b.length>=c.length&&c==b.substring(0,c.length)}function L(b,c){return b.length>=
8
+c.length&&c==b.substring(b.length-c.length,b.length)}function A(b,c,a){if(c<a.length){return false}for(var d=0,f=a.length;d<f;++d){if(a.charAt(d)!=b[d]){return false}}return true}function H(b){return b.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\xa0/g,"&nbsp;")}function E(b){return"XMP"==b.tagName}var B=null;function N(b){if(null==B){var c=document.createElement("PRE");c.appendChild(document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />'));B=!/</.test(c.innerHTML)}if(B){var a=
9
+b.innerHTML;if(E(b)){a=H(a)}return a}var d=[];for(var f=b.firstChild;f;f=f.nextSibling){D(f,d)}return d.join("")}function D(b,c){switch(b.nodeType){case 1:var a=b.tagName.toLowerCase();c.push("<",a);for(var d=0;d<b.attributes.length;++d){var f=b.attributes[d];if(!f.specified){continue}c.push(" ");D(f,c)}c.push(">");for(var h=b.firstChild;h;h=h.nextSibling){D(h,c)}if(b.firstChild||!/^(?:br|link|img)$/.test(a)){c.push("</",a,">")}break;case 2:c.push(b.name.toLowerCase(),'="',b.value.replace(/&/g,"&amp;").replace(/</g,
10
+"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;").replace(/\xa0/,"&nbsp;"),'"');break;case 3:case 4:c.push(H(b.nodeValue));break}}function M(b,c){var a=0,d=new u,f=[];for(var h=0;h<b.length;++h){var i=b[h];if(i.style==null){f.push(i);continue}var e=i.token,g=0,k=[];for(var l=0,j=e.length;l<j;l=d.next){d.decode(e,l);var o=d.ch;switch(o){case "\t":k.push(e.substring(g,l));var m=c-a%c;a+=m;for(;m>=0;m-="                ".length){k.push("                ".substring(0,m))}g=d.next;break;case "\n":case "\r":a=
11
+0;break;default:++a}}k.push(e.substring(g));f.push(new q(k.join(""),i.style))}return f}function K(b){var c=/(?:[^<]+|<\/?[a-zA-Z][^>]*>|<)/g,a=b.match(c),d=[];if(a){var f=null;for(var h=0,i=a.length;h<i;++h){var e=a[h],g;if(e.length<2||e.charAt(0)!=="<"){if(f&&f.style==="pln"){f.token+=e;continue}g="pln"}else{g=null}f=new q(e,g);d.push(f)}}return d}function G(b,c){var a=[],d=0,f=0,h=0,i=new q("",null);for(var e=0,g=c.length,k=0;e<g;++e){var l=c[e],j=l.end;if(j===k){continue}var o=j-f,m=i.token.length-
12
+h;while(m<=o){if(m>0){a.push(new q(i.token.substring(h,i.token.length),null==i.style?null:l.style))}f+=m;h=0;if(d<b.length){i=b[d++]}o=j-f;m=i.token.length-h}if(o){a.push(new q(i.token.substring(h,h+o),l.style));f+=o;h+=o}}return a}function R(b){var c=[],a=0,d=0,f=-1,h=new Array(12),i=0,e=null,g=new u;for(var k=0,l=b.length;k<l;++k){var j=b[k];if("pln"!=j.style){d+=j.token.length;continue}var o=j.token;for(var m=0,n=o.length;m<n;){g.decode(o,m);var p=g.ch,v=g.next,t=null;switch(a){case 0:if("<"==
13
+p){a=1}break;case 1:i=0;if("/"==p){a=7}else if(null==e){if("!"==p){a=2}else if(x(p)){a=8}else if("?"==p){a=9}else if("%"==p){a=11}else if("<"!=p){a=0}}else if("<"!=p){a=0}break;case 2:if("-"==p){a=4}else if(x(p)){a=3}else if("<"==p){a=1}else{a=0}break;case 3:if(">"==p){a=0;t="dec"}break;case 4:if("-"==p){a=5}break;case 5:if("-"==p){a=6}break;case 6:if(">"==p){a=0;t="com"}else if("-"==p){a=6}else{a=4}break;case 7:if(x(p)){a=8}else if("<"==p){a=1}else{a=0}break;case 8:if(">"==p){a=0;t="tag"}break;case 9:if("?"==
14
+p){a=10}break;case 10:if(">"==p){a=0;t="src"}else if("?"!=p){a=9}break;case 11:if("%"==p){a=12}break;case 12:if(">"==p){a=0;t="src"}else if("%"!=p){a=11}break}if(i<h.length){h[i++]=p.toLowerCase()}if(1==a){f=d+m}m=v;if(t!=null){if(null!=t){if(e){if(A(h,i,e)){e=null}}else{if(A(h,i,"script")){e="/script"}else if(A(h,i,"style")){e="/style"}else if(A(h,i,"xmp")){e="/xmp"}}if(e&&i&&"/"==h[0]){t=null}}if(null!=t){c.push(new r(f,"pln"));c.push(new r(d+v,t))}}}d+=j.token.length}c.push(new r(d,"pln"));return c}
15
+function V(b){var c=[],a=0,d=-1,f=0;for(var h=0,i=b.length;h<i;++h){var e=b[h],g=e.token;if("pln"==e.style){var k=new u,l=-1,j;for(var o=0,m=g.length;o<m;l=o,o=j){k.decode(g,o);var n=k.ch;j=k.next;if(0==a){if(n=='"'||n=="'"||n=="`"){c.push(new r(f+o,"pln"));a=1;d=n}else if(n=="/"){a=3}else if(n=="#"){c.push(new r(f+o,"pln"));a=4}}else if(1==a){if(n==d){a=0;c.push(new r(f+j,"str"))}else if(n=="\\"){a=2}}else if(2==a){a=1}else if(3==a){if(n=="/"){a=4;c.push(new r(f+l,"pln"))}else if(n=="*"){a=5;c.push(new r(f+
16
+l,"pln"))}else{a=0;j=o}}else if(4==a){if(n=="\r"||n=="\n"){a=0;c.push(new r(f+o,"com"))}}else if(5==a){if(n=="*"){a=6}}else if(6==a){if(n=="/"){a=0;c.push(new r(f+j,"com"))}else if(n!="*"){a=5}}}}f+=g.length}var p;switch(a){case 1:case 2:p="str";break;case 4:case 5:case 6:p="com";break;default:p="pln";break}c.push(new r(f,p));return G(b,c)}function S(b,c){var a=0,d=0,f=new u,h;for(var i=0;i<=b.length;i=h){if(i==b.length){g=-2;h=i+1}else{f.decode(b,i);h=f.next;var e=f.ch,g=d;switch(d){case 0:if(z(e)){g=
17
+1}else if(w(e)){g=2}else if(!s(e)){g=3}if(g&&a<i){var k=b.substring(a,i);c.push(new q(k,"pln"));a=i}break;case 1:if(!(z(e)||w(e))){g=-1}break;case 2:if(!(w(e)||x(e)||e=="_")){g=-1}break;case 3:if(z(e)||w(e)||s(e)){g=-1}break}}if(g!=d){if(g<0){if(i>a){var k=b.substring(a,i),l=new u;l.decode(k,0);var j=l.ch,o=l.next==k.length,m;if(z(j)){if(F[k]){m="kwd"}else if(j==="@"){m="lit"}else{var n=false;if(j>="A"&&j<="Z"){for(var p=l.next;p<k.length;p=l.next){l.decode(k,p);var v=l.ch;if(v>="a"&&v<="z"){n=true;
18
+break}}if(!n&&!o&&k.substring(k.length-2)=="_t"){n=true}}m=n?"typ":"pln"}}else if(w(j)){m="lit"}else if(!s(j)){m="pun"}else{m="pln"}a=i;c.push(new q(k,m))}d=0;if(g==-1){h=i;continue}}d=g}}}function X(b){if(!(b&&b.length)){return b}var c=R(b);return G(b,c)}function W(b){var c=[],a=0,d="tag",f=null,h=new u;for(var i=0;i<b.length;++i){var e=b[i];if("tag"==e.style){var g=e.token,k=0;for(var l=0;l<g.length;){h.decode(g,l);var j=h.ch,o=h.next,m=null,n=null;if(j==">"){if("tag"!=d){m=l;n="tag"}}else{switch(a){case 0:if("<"==
19
+j){a=1}break;case 1:if(s(j)){a=2}break;case 2:if(!s(j)){n="atn";m=l;a=3}break;case 3:if("="==j){m=l;n="tag";a=5}else if(s(j)){m=l;n="tag";a=4}break;case 4:if("="==j){a=5}else if(!s(j)){m=l;n="atn";a=3}break;case 5:if('"'==j||"'"==j){m=l;n="atv";a=6;f=j}else if(!s(j)){m=l;n="atv";a=7}break;case 6:if(j==f){m=o;n="tag";a=2}break;case 7:if(s(j)){m=l;n="tag";a=2}break}}if(m){if(m>k){c.push(new q(g.substring(k,m),d));k=m}d=n}l=o}if(g.length>k){c.push(new q(g.substring(k,g.length),d))}}else{if(e.style){a=
20
+0;d="tag"}c.push(e)}}return c}function U(b){var c=[],a=null,d=new u,f=null;for(var h=0,i=b.length;;++h){var e;if(h<i){e=b[h];if(null==e.style){b.push(e);continue}}else if(!a){break}else{e=new q("",null)}var g=e.token;if(null==a){if("src"==e.style){if("<"==d.decode(g,0)){d.decode(g,d.next);if("%"==d.ch||"?"==d.ch){a=d.ch;c.push(new q(g.substring(0,d.next),"tag"));g=g.substring(d.next,g.length)}}}else if("tag"==e.style){if("<"==d.decode(g,0)&&"/"!=g.charAt(d.next)){var k=g.substring(d.next).toLowerCase();
21
+if(y(k,"script")||y(k,"style")||y(k,"xmp")){a="/"}}}}if(null!=a){var l=null;if("src"==e.style){if(a=="%"||a=="?"){var j=g.lastIndexOf(a);if(j>=0&&">"==d.decode(g,j+1)&&g.length==d.next){l=new q(g.substring(j,g.length),"tag");g=g.substring(0,j)}}if(null==f){f=[]}f.push(new q(g,"pln"))}else if("pln"==e.style){if(null==f){f=[]}f.push(e)}else if("tag"==e.style){if("<"==d.decode(e.token,0)&&e.token.length>d.next&&"/"==d.decode(e.token,d.next)){l=e}else{c.push(e)}}else if(h>=i){l=e}else{if(f){f.push(e)}else{c.push(e)}}if(l){if(f){var o=
22
+C(f);c.push(new q("<span class=embsrc>",null));for(var m=0,n=o.length;m<n;++m){c.push(o[m])}c.push(new q("</span>",null));f=null}if(l.token){c.push(l)}a=null}}else{c.push(e)}}return c}function Q(b){var c=null,a=null;for(var d=0;d<b.length;++d){if("pln"==b[d].style){c=d;break}}for(var d=b.length;--d>=0;){if("pln"==b[d].style){a=d;break}}if(null==c){return b}var f=new u,h=b[c].token,i=f.decode(h,0);if('"'!=i&&"'"!=i){return b}var e=f.next,g=b[a].token,k=g.lastIndexOf("&");if(k<0){k=g.length-1}var l=
23
+f.decode(g,k);if(l!=i||f.next!=g.length){l=null;k=g.length}var j=[];for(var d=0;d<c;++d){j.push(b[d])}j.push(new q(h.substring(0,e),"atv"));if(a==c){j.push(new q(h.substring(e,k),"pln"))}else{j.push(new q(h.substring(e,h.length),"pln"));for(var d=c+1;d<a;++d){j.push(b[d])}if(l){b.push(new q(g.substring(0,k),"pln"))}else{b.push(b[a])}}if(l){j.push(new q(g.substring(k,g.length),"pln"))}for(var d=a+1;d<b.length;++d){j.push(b[d])}return j}function T(b){var c=[],a=null,d=false,f="";for(var h=0,i=b.length;h<
24
+i;++h){var e=b[h],g=c;if("tag"==e.style){if(d){d=false;f="";if(a){c.push(new q("<span class=embsrc>",null));var k=C(Q(a));for(var l=0,j=k.length;l<j;++l){c.push(k[l])}c.push(new q("</span>",null));a=null}}else if(f&&e.token.indexOf("=")>=0){var o=f.toLowerCase();if(y(o,"on")||"style"==o){d=true}}else{f=""}}else if("atn"==e.style){f+=e.token}else if("atv"==e.style){if(d){if(null==a){a=[]}g=a;e=new q(e.token,"pln")}}else{if(a){g=a}}g.push(e)}return c}function C(b){var c=V(b),a=[];for(var d=0;d<c.length;++d){var f=
25
+c[d];if("pln"===f.style){S(f.token,a);continue}a.push(f)}return a}function O(b){var c=X(b);c=W(c);c=U(c);c=T(c);return c}function P(b){var c=M(K(b),8),a=false;for(var d=0;d<c.length;++d){if("pln"==c[d].style){if(y(I(c[d].token),"&lt;")){for(var f=c.length;--f>=0;){if("pln"==c[f].style){a=L(I(c[f].token),"&gt;");break}}}break}}return a?O(c):C(c)}function Z(b){try{var c=P(b),a=[],d=null;for(var f=0;f<c.length;f++){var h=c[f];if(h.style!=d){if(d!=null){a.push("</span>")}if(h.style!=null){a.push("<span class=",
26
+h.style,">")}d=h.style}var i=h.token;if(null!=h.style){i=i.replace(/(\r\n?|\n| ) /g,"$1&nbsp;").replace(/\r\n?|\n/g,"<br>")}a.push(i)}if(d!=null){a.push("</span>")}return a.join("")}catch(e){if("console"in window){console.log(e);console.trace()}return b}}function Y(){var b=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],c=[];for(var a=0;a<b.length;++a){for(var d=0;d<b[a].length;++d){c.push(b[a][d])}}b=null;var f=0;function h(){var i=
27
+(new Date).getTime()+250;for(;f<c.length&&(new Date).getTime()<i;f++){var e=c[f];if(e.className&&e.className.indexOf("prettyprint")>=0){var g=false;for(var k=e.parentNode;k!=null;k=k.parentNode){if((k.tagName=="pre"||k.tagName=="code"||k.tagName=="xmp")&&k.className&&k.className.indexOf("prettyprint")>=0){g=true;break}}if(!g){var l=N(e);l=l.replace(/(?:\r\n?|\n)$/,"");var j=Z(l);if(!E(e)){e.innerHTML=j}else{var o=document.createElement("PRE");for(var m=0;m<e.attributes.length;++m){var n=e.attributes[m];
28
+if(n.specified){o.setAttribute(n.name,n.value)}}o.innerHTML=j;e.parentNode.replaceChild(o,e)}}}}if(f<c.length){setTimeout(h,250)}}h()};this.prettyPrint=Y;
29
+; })();

+ 127
- 0
style.css Bestand weergeven

@@ -0,0 +1,127 @@
1
+body {
2
+ margin: 90px 30px;
3
+ font-size: large;
4
+}
5
+
6
+h1 {
7
+ position: absolute;
8
+ top: 0px;
9
+ left: 0px;
10
+ width: 100%;
11
+ background-color: #eee;
12
+ color: #666;
13
+ margin: 0px;
14
+ padding: 10px 0px;
15
+ border-bottom: 1px solid black;
16
+}
17
+
18
+h1 img {
19
+ margin: 0px 5px 0px 10px;
20
+}
21
+
22
+h2 {
23
+ border-bottom: 5px solid #ccc;
24
+}
25
+
26
+h3 {
27
+ border-bottom: 3px solid #ccc;
28
+}
29
+
30
+input#openid_url {
31
+ background: url('demo/openid.gif') no-repeat;
32
+ padding-left: 20px;
33
+}
34
+
35
+div.left {
36
+ float: left;
37
+ width: 65%;
38
+ margin: 0px;
39
+ padding: 0px 20px 0px 0px;
40
+ border-right: 2px solid #ccc;
41
+}
42
+
43
+div.right {
44
+ margin-left: 65%; padding-left: 40px;
45
+}
46
+
47
+h2.first {
48
+ margin-top: 0px;
49
+}
50
+
51
+small {
52
+ font-size: 0.3em;
53
+}
54
+
55
+#footnote {
56
+ border-top: 1px solid #ccc;
57
+ padding: 5px;
58
+ font-size: small;
59
+}
60
+
61
+.left li {
62
+ margin-bottom: 10px;
63
+}
64
+
65
+.left li ul {
66
+ margin-top: 10px;
67
+}
68
+
69
+ul#menu {
70
+ position: absolute; top: 0px; right: 0px;
71
+ list-style-type: none; margin: 0px; padding: 0px 5px;
72
+}
73
+
74
+ul#menu li {
75
+ display: inline;
76
+ font-size: small;
77
+}
78
+
79
+dd {
80
+ margin-top: 5px;
81
+ margin-bottom: 20px;
82
+}
83
+
84
+dt {
85
+ font-family: monospace;
86
+}
87
+
88
+p.asof {
89
+ text-align: center;
90
+ font-size: small;
91
+ text-transform: uppercase;
92
+}
93
+
94
+table.providers {
95
+ width: 100%;
96
+ border-collapse: collapse;
97
+}
98
+
99
+table.providers td {
100
+ border: 1px solid #ccc;
101
+}
102
+
103
+table.providers th {
104
+ background-color: #ccc;
105
+ border: 1px solid #999;
106
+}
107
+
108
+td.good {
109
+ background-color: green;
110
+}
111
+
112
+td.bad {
113
+ background-color: red;
114
+}
115
+
116
+td.warn {
117
+ background-color: orange;
118
+}
119
+
120
+td.good, td.bad, td.warn {
121
+ text-align: center;
122
+ color: white;
123
+}
124
+
125
+ul.key strong {
126
+ font-family: monospace;
127
+}

Laden…
Annuleren
Opslaan