[ Index ]
 

Code source de Horde 3.1.3

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/Horde/Auth/ -> ipbasic.php (sommaire)

(pas de description)

Poids: 113 lignes (4 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

Auth_ipbasic:: (4 méthodes):
  Auth_ipbasic()
  _setParams()
  transparent()
  _addressWithinCIDR()


Classe: Auth_ipbasic  - X-Ref

The Auth_ipbasic class provides access control based on CIDR masks
(client IP addresses). 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. If you need
more sophisticated IP-based authentication, you should look at the
Auth_ipmap class which lets you map IP blocks to specific
usernames.

Parameters:
'blocks'     An array of CIDR masks which are allowed access.

$Horde: framework/Auth/Auth/ipbasic.php,v 1.20.10.7 2006/01/01 21:28:07 jan Exp $

Copyright 1999-2006 Chuck Hagenbuch <chuck@horde.org>

See the enclosed file COPYING for license information (LGPL). If you
did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.

Auth_ipbasic($params = array()   X-Ref
Constructs a new Basic IP authentication object.

param: array $params  A hash containing parameters.

_setParams($params)   X-Ref
Set parameters for the Auth_ipbasic object.

param: array $params  Should contain 'blocks', an array of CIDR masks.

transparent()   X-Ref
Automatic authentication: Find out if the client matches an allowed IP
block.

return: boolean  Whether or not the client is allowed.

_addressWithinCIDR($address, $cidr)   X-Ref
Determine if an IP address is within a CIDR block.

param: string $address  The IP address to check.
param: string $cidr     The block (e.g. 192.168.0.0/16) to test against.
return: boolean  Whether or not the address matches the mask.



Généré le : Sun Feb 25 18:01:28 2007 par Balluche grâce à PHPXref 0.7