ride / lib-security-generic
Generic security model of the Ride framework
Installs: 1 100
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 8
Forks: 0
Open Issues: 0
Requires
- ride/lib-encryption: ^1.0.0
- ride/lib-event: ^1.0.0
- ride/lib-reflection: ^1.0.0
- ride/lib-security: ^1.0.0
- ride/lib-system: ^1.0.0
This package is auto-updated.
Last update: 2024-12-13 01:03:48 UTC
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