Zend: How to authenticate using OpenId on local server.
Posted
by NAVEED
on Stack Overflow
See other posts from Stack Overflow
or by NAVEED
Published on 2010-04-04T15:04:23Z
Indexed on
2010/04/04
15:13 UTC
Read the original article
Hit count: 440
I am using zend framework. Now I want to authenticate users with other already registered accounts using RPX.
I am following the 3 steps as described at RPX site:
1- Get the Widget
2- Receive Tokens
3- Choose Providers
I created a controller(person) and action(signin) to show widget and my own signin form. When following action (http://test.dev/#person/personsignin) is called then my own login form and widget is shown successfully. # is used in above URL for AJAX indication.
public function personsigninAction() {
$this->view->jsonEncoded = true;
// Person Signin Form
$PersonSigninForm = new Form_PersonSignin();
$this->view->PersonSigninForm = $PersonSigninForm;
$this->view->PersonSigninForm->setAction( $this->view->url() );
$request = $this->getRequest();
if ( $request->isPost() ) {
}
}
There are two problems while login using openid widget:
When I am authenticated from outside(for example: Yahoo) then I am redirected to http://test.dev, therefor indexAction in called in indexController and home page is shown. I want to redirect to http://test.dev/#person/personsignin after authentication and want to set session in isPost() condition of personsigninAction() (described above).
For now I consider indexAction to be called when outside authentication is done. Now I posted the code from http://gist.github.com/291396 in indexAction to follow step 3 mentioned above. But it is giving me following error:
An error occured: Invalid parameter: apiKey
Am I using the right way to use this. This is my very first attempt to this stuff. Can someone tell me the exact steps using my above actions? Thanks.
© Stack Overflow or respective owner