OpenID consumer demo

The login form below uses a hidden iframe to process the form (assuming the user has javascript enabled; if they don't, it falls back gracefully). If your identity provider implements checkid_immediate properly (which several don't appear to), and has enough information to authorise you without requiring your input, the entire login process should happen without any noticable change except for the status message.

If your identity provider requires interaction with you, the form will be submitted as usual and you'll leave this page (but, as usual, will return when your IdP is done with you). If your identity provider is broken, you won't see anything happening after the initial page load and redirect. This is either because the identity provider is trying to interact with you (via a hidden iframe) when it has been explicitly told not to, or because it is sending some kind of non-openID error response, such as a HTTP 500 error. This is the identity provider's fault (it's violating the OpenID specifications), not Poidsy's. If you were implementing this on a live site, you'd probably want to either add a timeout or monitor the iframe status to detect if it wasn't working and do a normal login.

Note: if you are using Firefox and have the 'Disallow third party cookies' preference enabled, Firefox won't send cookies to your provider when it's loaded in the iframe. This almost certainly will mean that your provider can't validate your identity immediately, and thus you'll be redirected. Other browsers (such as IE and Safari) allow these cookies to be sent even if they disallow setting of third-party cookies.

Time: ', date('r'), '. Clear session info

'; if (isset($_SESSION['openid']['error'])) { echo '
An error occured: ', htmlentities($_SESSION['openid']['error']), '
'; unset($_SESSION['openid']['error']); } else if (isset($_SESSION['openid']['validated']) && $_SESSION['openid']['validated']) { echo '
Logged in as ', htmlentities($_SESSION['openid']['identity']), '
'; } else { echo '
Not logged in
'; } ?>