Хорошо, я узнал, как это сделать:
$status='';
$auth=Zend_Auth::getInstance();
$post=array();
$get=$this->getRequest()->getParams();
if($this->getRequest()->isPost()){
$post=$this->getRequest()->getPost();
}
//changed nickname and fullname to false, so if provider didn't provide these, authentication won't fail.
$profile=new Zend_OpenId_Extension_Sreg(array(
'nickname' => false,
'email' => true,
'fullname' => false),null,1.1
);
if($auth->hasIdentity()){
if(isset($get['openid_action']) && $get['openid_action']=='logout'){
$auth->clearIdentity();
$status="logged Out";
}else{
$status="logged in as ".$auth->getIdentity();
}
}else if(isset($post['openid_action']) && $post['openid_action']=='login' && $post['openid_identifier']){
$result=$auth->authenticate(new Zend_Auth_Adapter_OpenId($post['openid_identifier'],null,null,null,$profile));
$status='something went wrong';
}else if(isset($get['openid_mode'])){
$result=$auth->authenticate(new Zend_Auth_Adapter_OpenId(null,null,null,null,$profile));
if(!$result->isValid()){
$auth->clearIdentity();
}else{
//here you have the information you need.
$info=$profile->getProperties();
}
$status.= implode('
',$result->getMessages());
}else{
$status='You are not logged in';
}
$this->view->status=$status;
Но если вы хотите использовать google, yahoo или любого поставщика OpenId 2.0, вам следует использовать патчи .