inok/rbac
Composer 安装命令:
composer require inok/rbac
包简介
PHP-RBAC is the de-facto authorization library for PHP. It provides developers with NIST Level 2 Standard Role Based Access Control and more, in the fastest implementation yet.
README 文档
README
PHP-RBAC is an authorization library for PHP. It provides developers with NIST Level 2 Hierarchical Role Based Access Control and more, in the fastest implementation yet.
Current Stable Release: PHP-RBAC v3.0
Connect With Us
- PHP-RBAC Base Home Page: http://phprbac.net/
- PHP-RBAC Base Documentation: http://phprbac.net/docs_contents.php
- PHP-RBAC Base API: http://phprbac.net/api.php
- Issue Tracker: https://github.com/nchizhov/inok-rbac/issues?state=open
What is a Rbac System?
Take a look at the "Before You Begin" section of our Documentation to learn what an RBAC system is and what PHP-RBAC has to offer you and your project.
NIST Level 2 Compliance
For information regarding NIST RBAC Levels, please see This Paper.
For more great resources see the NIST RBAC Group Page.
Installation
You can now use Composer to install the PHP-RBAC code base.
For Installation Instructions please refer to the "Getting Started" section of our Documentation.
Usage
Instantiating a PHP-RBAC Object
With a 'use' statement:
use Inok\RBAC\Rbac; $rbac = new Rbac($db, $tablePrefix);
, where
- $db - PDO Object (supports MySQL, SQLite)
- $tablePrefix - RBAC-tables prefix (default: phprbac_)
Tests
Xml-files for Unit Tests:
- phpunit.mysql.xml - For MySQL (MariaDB)
- phpunit.sqlite.xml - For SQLite
Fill correct data for database connection in needed phpunit xml file:
- DB_DSN - Data source name
- DB_USER - Database username
- DB_PASSWD - Database password
Run:
vendor/bin/phpunit -c xml_file_name
PHP-RBAC and PSR
PHP-RBAC's Public API is now fully PSR-4 compliant.
You can now:
- Use Composer to install/update PHP-RBAC
- Use any PSR-4 compliant autoloader with PHP-RBAC
- Use the included autoloader to load PHP-RBAC
If you notice any conflicts with PSR compliance please Submit an Issue.
How You Can Help
- Report Bugs, Enhancement Requests or Documentation errors using our Issue Tracker
- Choose a Bug to work on and submit a Pull Request
- Make helpful suggestions and contributions to the Documentation using our Issue Tracker
inok/rbac 适用场景与选型建议
inok/rbac 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 24 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 03 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「security」 「rbac」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 inok/rbac 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 inok/rbac 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 inok/rbac 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Provide a way to secure accesses to all routes of an symfony application.
It's a barebone security class written on PHP
Access management from UI
Contao CMS integrity check for some files
A PHP security linter to detect insecure functions like var_dump, print_r, and other dangerous functions in your codebase
Permission handling for lumen 6.x and up
统计信息
- 总下载量: 24
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 32
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2024-03-08