I've been trying to force myself to learn Zend Framework 2.0.2 for almost a week now. I've spent the majority of my time reading the documentation and various Q&A posts related to ZF2. I got started creating a simple "Admin" module and it was all making sense until I got to Authentication. Here is where I get confused.
In ZF1, I always used Zend_Auth
as a plugin; however, in ZF2 it is very unclear to me where and how plugins should be used. So far, I've read that there are "Controller Plugins." They make sense, but I wanted to create more of a "global" plugin for Authentication.
I don't think I'm grasping their idea of what a "module" is in ZF2 vs ZF1. Does anybody know how global plugins should be set up? I read through this article: http://p0l0.binware.org/index.php/2012/02/18/zend-framework-2-authentication-acl-using-eventmanager/. It makes sense. I see how authentication happens in the realm of the "User" module. But what about the rest of the application?
How would I implement an authentication layer globally? Could be any.
Any advice/comments on how to improve this question and make it more specific, if necessary, would be greatly appreciated.
In ZF2, the concept of "plugins" are generally provided via ServiceManagers.
It can be hard to track down the quality/up-to-date ZF2 content for stuff like that, so here's a few links:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With