fawno / ip-authentication
IP Authenticator for CakePHP 4.3
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:cakephp-plugin
Requires
- php: >=7.2
- cakephp/authentication: 2.*
- cakephp/cakephp: ^4.3
Requires (Dev)
- phpunit/phpunit: ~8.5.0 || ^9.3
README
IP Authenticator for CakePHP 4 Authentication plugin
This plugin provides an IP Authenticator for CakePHP 4 authentication plugin.
Table of contents
Requirements
- PHP >= 7.2.0
- CakePHP >= 4.3.0
- CakePHP Authentication >= 2.0
Installation
Install this plugin into your application using composer:
- Add
fawno/ip-authentication
package to your project:composer require fawno/ip-authentication
- Load the IPAuthenticator in your
Application.php
:use IPAuthenticator\Authenticator\IPAuthenticator;
- Load the IPAuthenticator in your Authentication Service (
Application.php
):// Load the authenticators. Session should be first. $service->loadAuthenticator('Authentication.Session'); $service->loadAuthenticator(IPAuthenticator::class, [ 'auth' => [ '127.0.0.1' => [ 'username' => 'localhost', 'displayname' => 'Local Host', 'dn' => [], 'memberof' => [ 'Group' => 'Group', ], ], ], ]);