PHP Класс Horde_Auth_Ipbasic, horde

It is not meant for user-based systems, but for times when you want a block of IPs to be able to access a site, and that access is simply on/off - no preferences, etc.
Автор: Chuck Hagenbuch ([email protected])
Наследование: extends Horde_Auth_Base
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$_capabilities array An array of capabilities, so that the driver can report which operations it supports and which it doesn't.

Открытые методы

Метод Описание
__construct ( array $params = [] ) Constructor.
transparent ( ) : boolean Automatic authentication: Find out if the client matches an allowed IP block.

Защищенные методы

Метод Описание
_addressWithinCIDR ( string $address, string $cidr ) : boolean Determine if an IP address is within a CIDR block.
_authenticate ( string $userId, array $credentials ) Not implemented

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( array $params = [] )
$params array Optional Parameters:
'blocks' - (array) CIDR masks which are allowed access.

_addressWithinCIDR() защищенный Метод

Determine if an IP address is within a CIDR block.
protected _addressWithinCIDR ( string $address, string $cidr ) : boolean
$address string The IP address to check.
$cidr string The block (e.g. 192.168.0.0/16) to test against.
Результат boolean Whether or not the address matches the mask.

_authenticate() защищенный Метод

Not implemented
protected _authenticate ( string $userId, array $credentials )
$userId string The userID to check.
$credentials array An array of login credentials.

transparent() публичный Метод

Automatic authentication: Find out if the client matches an allowed IP block.
public transparent ( ) : boolean
Результат boolean Whether or not the client is allowed.

Описание свойств

$_capabilities защищенное свойство

An array of capabilities, so that the driver can report which operations it supports and which it doesn't.
protected array $_capabilities
Результат array