I think your best bet is to use the OpenID module from the Zend Framework . It can be used on its own, without using the entire structure, and they have a fairly simple explanation of how to use it in the pages of their manual . It is simple (if you understand the concept of OpenID) as:
login_page.php:
Zend_Loader::loadClass('Zend_OpenId');
$consumer = new Zend_OpenId_Consumer();
if(!$consumer->login($_POST['openid_identifier'], 'redirect_to.php'))
{
die('OpenID login failed.');
}
redirect_to.php:
Zend_Loader::loadClass('Zend_OpenId');
$consumer = new Zend_OpenId_Consumer();
if($consumer->verify($_GET, $id))
{
echo htmlspecialchars($id).' is a valid ID.';
}
else
{
if(!headers_sent())
{
header('HTTP/1.1 307 Temporary Redirect', true, 307);
header('Location: login.php?login=failed');
}
else die('Invalid ID.');
}
, OpenID PHP (php-openid), OpenID Foundation.
EDIT: Zend_OpenId ( ).
Zend Framework ZendFramework-1.9.2/library/Zend/OpenId.
, :
- ,
[...]/OpenId/Exception.php Zend_Exception Exception. - (, ) .
:
require_once '/path/to/OpenId/Consumer.php';
$consumer = new Zend_OpenId_Consumer();
require_once '/path/to/OpenId/Provider.php';
$provider = new Zend_OpenId_Provider();
, , ! , ... Zend , OpenID, !