> For the complete documentation index, see [llms.txt](https://doc.kaliphp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.kaliphp.com/auth-check.md).

# 权限验证

框架中提供了一套完整的权限验证逻辑，可对路由下所有`method`进行权限验证&#x20;

用户需要在入口处（index.php）中添加权限验证配置，具体如下：

```
// APP信息
$app_config = [
    'session_start'  => true,                               // 是否启用session
    'check_purview_handle' => ['model\mod_auth', 'auth'],   // 权限检查
    'menu_file'  => 'menu.xml',                             // 获取菜单和用户权限配置
];
kali::registry( $app_config );
```
