OpenID consumer demo
An error occured: ', htmlentities($_SESSION['openid']['error']), '';
unset($_SESSION['openid']['error']);
} else if (isset($_SESSION['openid']['validated']) && $_SESSION['openid']['validated']) {
// Upon a successful validation, the validated field will have been set to
// true. It's important to check the validated field, as the identity
// will be specified in the array throughout the process, so it would be
// possible for the user to request the page with an identity specified
// but before Poidsy had validated it. As above, we unset the session
// vars so that the details don't persist.
echo 'Success: your OpenID identifier is ', htmlentities($_SESSION['openid']['identity']), '
';
unset($_SESSION['openid']['validated']);
// Show the SREG data returned, if any. SREG data is only present if you
// defined one of the OPENID_SREG constants before the request was sent,
// if the user's identity provider supports SREG, and if (depending on the
// provider) the user gives permission for you to have the data.
if (isset($_SESSION['openid']['sreg'])) {
echo '';
echo 'Simple Registration Extension data';
foreach ($_SESSION['openid']['sreg'] as $type => $data) {
echo '', htmlentities($type), ' | ';
echo '', htmlentities($data), ' |
';
}
echo '
';
unset($_SESSION['openid']['sreg']);
}
}
?>