ride/lib-security-generic
最新稳定版本:1.0.0
Composer 安装命令:
composer require ride/lib-security-generic
包简介
Generic security model of the Ride framework
README 文档
README
Generic security model for the security library of the PHP Ride framework.
This security model is file based and usefull for a small user base or as a backup for other security models.
What's In This Library
SecurityModelIO
The SecurityModelIO interface is used by the GenericSecurityModel as a data source.
An implementation is provided for the XML format by the XmlSecurityModelIO class.
GenericSecurityModel
The GenericSecurityModel class offers a generic implementation of the SecurityModel interface from the ride/lib-security module. This class also implements the GenericUser, GenericRole and GenericPermission classes.
Code Sample
Check this code sample to see how to initialize this library:
use ride\library\encryption\hash\Hash; use ride\library\event\EventManager; use ride\library\security\model\generic\io\XmlSecurityModelIO; use ride\library\security\model\generic\GenericSecurityModel; use ride\library\system\System; function createSGenericSecurityModel(System $system, EventManager $eventManager, Hash $hashAlgorithm) { $file = $system->getFileSystem()->getFile('/path/to/security.xml'); $securityModelIO = new XmlSecurityModelIO($file); $securityModel = new GenericSecurityModel($securityModelIO, $eventManager, $hashAlgorithm); return $securityModel; }
Implementations
You can check the related implementations of this library:
Installation
You can use Composer to install this library.
composer require ride/lib-security-generic
统计信息
- 总下载量: 1.51k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-02-21