【发布时间】:2013-03-13 09:08:45
【问题描述】:
我正在建立一个封闭的网站,它为每个人提供一个登陆页面。
我正在使用ZfcUser 和BjyAuthorize。
现在一切正常,但我想知道如何排除我的应用程序的 Application\Controller\Index::index 操作。
在我的module.bjyauthorize.global.php 中,我告诉我的操作不需要身份验证:
'BjyAuthorize\Guard\Controller' => array(
array(
'controller' => 'Application\Controller\Index',
'action' => 'index',
'roles' => array()
),
// ...
但我仍然被转发到ZFCUser 登录页面。
知道我错过了什么吗?
编辑:
我尝试使用 guest 角色,但到目前为止没有运气:
'default_role' => 'guest',
'BjyAuthorize\Provider\Role\Config' => array(
'guest' => array(),
'user' => array(
'children' => array(
'admin' => array(),
),
),
),
【问题讨论】:
-
定义默认角色
guest- 使登陆页面只需要guest -
我更新了我的帖子。我尝试将
guest添加到我的角色数组中,但我仍然被转发......也许 ZFCUser 正在干扰?
标签: php authentication zend-framework2 zfcuser bjyauthorize