Hello, 
I am 'disassembling' ZFCUser trying to understand logics behind this module
and how to extend it.
I am a bit confuse about the AuthenticationService and how it works.

First, within the Module.php we have 

'ZfcUser\Authentication\Adapter\AdapterChain' =>
'ZfcUser\Authentication\Adapter\AdapterChainServiceFactory',

that is required within the configuration key 'zfcuser_auth_service'

                'zfcuser_auth_service' => function ($sm) {
                    return new \Zend\Authentication\AuthenticationService(
                        $sm->get('ZfcUser\Authentication\Storage\Db'),
                       
$sm->get('ZfcUser\Authentication\Adapter\AdapterChain') // here
                    );
                },

AuthenticationService requires as second parameter an instance of
Adapter\AdapterInterface and the
'ZfcUser\Authentication\Adapter\AdapterChain' will create an instance of
AdapterChainServiceFactory ( correct me if I am mistaking) that returns the
correct object type after it calls the 'createService' method: who calls
this method and when? 'ZfcUser\Authentication\Adapter\AdapterChain' will
contain the object returned by the createService?

Also I noticed that the controller plugin 'zfcUserAuthentication' is created
to be used as a 'ZF1 action helper' in the UserController: as the
AuthAdapter exists within the $authService why don't use directly the
'zfcuser_auth_service' by creating a getauthAdapter in the userController?

Thank you





-----
Sergio Rinaudo's Blog 
--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/ZFCUser-some-questions-about-teh-AuthenticationService-tp4660053.html
Sent from the Zend Framework mailing list archive at Nabble.com.

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com


Reply via email to