ZfcUser/HybridAuth: Best way to protect all Controllers?

For programming and general questions on Zend Framework

ZfcUser/HybridAuth: Best way to protect all Controllers?

Postby shivapc on Tue Jan 08, 2013 5:29 am

Hello,

I am using ZfcUser via HybridAuth for enabling Facebook Authentication in Zend Framework 2. I downloaded the "scn-social-auth" module and added into my project. Now, the Controller "user" under ZfcUser module is protected. That is, if I am not logged in, it will redirect me to the login page.

User not logged in:
visit //localhost/user => will redirect to: //localhost/user/login

Now, I want to protect all my Controller Actions with ZfcUser. That is, any module I create, if I the user is not logged in, it should redirect me to http://localhost/user/login. What is the best of doing this? I can check whether the user is logged in each of the action in each module. But, it doesn't look like a good option. Any suggestion?

Regards,
Shiva
shivapc
 
Posts: 1
Joined: Tue Jan 08, 2013 5:21 am

Re: ZfcUser/HybridAuth: Best way to protect all Controllers?

Postby ethought on Tue Feb 05, 2013 5:07 am

Hi -

Did you ever find a solution to this problem? I am trying to figure out just the same thing.

Thanks
ethought
 
Posts: 1
Joined: Tue Feb 05, 2013 5:06 am


Return to Zend Framework

Who is online

Users browsing this forum: No registered users and 6 guests