Hi,
I was following this tutorial http://www.bravo-kernel.com/2015/04/how-to-add-jwt-authentication-to-a-cakephp-3-rest-api/ using this plugin https://github.com/ADmad/cakephp-jwt-auth
But now I need to make a REST API with ACL manager, for divide users in groups/roles and some roles/groups/users have different permission for access to diferents methods in controllers…so I use this plugin https://github.com/ivanamat/cakephp3-aclmanager but try to put this inside of /Api/AppController:
/* public $components = [
‘Acl’ => [
‘className’ => ‘Acl.Acl’
]
];*/
public function initialize()
{
parent::initialize();
…
…
$this->loadComponent(‘Auth’, [
/‘authorize’ => [
‘Acl.Actions’ => [‘actionPath’ => ‘controllers/’]
],/
‘storage’ => ‘Memory’,
‘authenticate’ => [
‘Form’ => [
‘scope’ => [‘Users.active’ => 1]
],
‘ADmad/JwtAuth.Jwt’ => [
‘parameter’ => ‘token’,
‘userModel’ => ‘Users’,
‘scope’ => [‘Users.active’ => 1],
‘fields’ => [
‘username’ => ‘id’
],
‘queryDatasource’ => true
]
],
‘unauthorizedRedirect’ => false,
‘checkAuthIn’ => ‘Controller.initialize’
]);
If I uncomment the lines I recieve this error:
“DbAcl::check() - Failed ACO node lookup in permissions check. Node references”
Existe another way for use ACL+JWT?
Thanks in advance