I'm having an issue with zfcrbac that I can't figure out.
I think I might missed something in configuration but I have read a few times the documentation with out any clue.
Whenever I try to use this I get
"Argument 1 passed to ZfcRbac\Service\RoleService::__construct() must be an instance of ZfcRbac\Identity\IdentityProviderInterface, instance of Zend\Authentication\AuthenticationService given"
I have
'identity_provider' => 'AuthService',
To which AuthService is the alias for Zend\Authentication\AuthenticationService
and I have it configured like this
'factories' => array(
'Auth\Model\AuthStorage' => function($sm){
return new \Auth\Model\AuthStorage('auth_user');
},
'AuthService' => function($sm) {
$dbAdapter = $sm->get('Zend\Db\Adapter\Adapter');
$dbTableAuthAdapter = new DbTableAuthAdapter($dbAdapter, 'user','username','password', 'md5(concat("' . $staticSalt . '" ,?,passwordSalt)) and active=1');
$authService = new AuthenticationService();
$authService->setAdapter($dbTableAuthAdapter);
$authService->setStorage($sm->get('Auth\Model\AuthStorage'));
return $authService;
},
),
So I don't know what am I missing?
'identity_provider' => 'AuthService'
for'identity_provider' => 'ZfcRbac\Identity\AuthenticationIdentityProvider'
And chenged this'AuthService' => function($sm) {
for'Zend\Authentication\AuthenticationService' => function($sm) {
I'm not getting errors now, but If I enable guards, it is not respecting the roles, is there a way to print out the role and permissions so I can know what permissions this user have? – user973783 Mar 24 '14 at 22:31