Trying to understand the Zend_Auth OpenId

Posted by Will Olbrys on Stack Overflow See other posts from Stack Overflow or by Will Olbrys
Published on 2010-06-10T02:26:04Z Indexed on 2010/06/10 2:32 UTC
Read the original article Hit count: 166

Filed under:
|
|

I'm using a slightly modified version of the Zend_Auth_OpenId classes to get openid logins from google apps. The results are very positive, as I seem to be getting successful results from Google.

I cannot get successful results passed to Zend_Auth, though. For example, Zend_Auth_Adapter_OpenId on line 241:

if (!$consumer->login($id,
                    $this->_returnTo,
                    $this->_root,
                    $this->_extensions,
                    $this->_response)) {
                return new Zend_Auth_Result(
                    Zend_Auth_Result::FAILURE,
                    $id,
                    array("Authentication failed", $consumer->getError()));
            }

The consumer calls login() which in turn calls the private method _checkId() in Zend_OpenId_Consumer. _checkId() always ends in redirecting to the openid server. How is this ever supposed to return a valid Zend_Auth_Result object?

I'm pretty close to giving up and trying to implement another OpenId library, but I'm so close to just making this work. I must be missing something so obvious!

Maybe I don't understand how openid works exactly, but if someone could help me understand I would really appreciate it.

© Stack Overflow or respective owner

Related posts about zend-framework

Related posts about openid