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

0.0.3 2025-02-19 03:16 UTC

This package is auto-updated.

Last update: 2025-02-19 03:24:40 UTC


README

GitHub license GitHub tag (latest SemVer) Packagist Packagist Downloads GitHub issues GitHub forks GitHub stars

IP Authenticator for CakePHP 4 Authentication plugin

This plugin provides an IP Authenticator for CakePHP 4 authentication plugin.

Table of contents

Requirements

TOC

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',
                ],
            ],
        ],
    ]);

TOC