ILIAS
Release_4_4_x_branch Revision 61816
|
Public Member Functions | |
Auth_RADIUS () | |
Constructor. | |
addServer ($servername= 'localhost', $port=0, $sharedSecret= 'testing123', $timeout=3, $maxtries=3) | |
Adds a RADIUS server to the list of servers for requests. | |
getError () | |
Returns an error message, if an error occurred. | |
setConfigfile ($file) | |
Sets the configuration-file. | |
putAttribute ($attrib, $value, $type=null) | |
Puts an attribute. | |
putVendorAttribute ($vendor, $attrib, $value, $type=null) | |
Puts a vendor-specific attribute. | |
dumpAttributes () | |
Prints known attributes received from the server. | |
open () | |
Overwrite this. | |
createRequest () | |
Overwrite this. | |
putStandardAttributes () | |
Puts standard attributes. | |
putAuthAttributes () | |
Puts custom attributes. | |
putServer ($servername, $port=0, $sharedsecret= 'testing123', $timeout=3, $maxtries=3) | |
Configures the radius library. | |
putConfigfile ($file) | |
Configures the radius library via external configurationfile. | |
start () | |
Initiates a RADIUS request. | |
send () | |
Sends a prepared RADIUS request and waits for a response. | |
getAttributes () | |
Reads all received attributes after sending the request. | |
close () | |
Frees resources. | |
Public Member Functions inherited from PEAR | |
PEAR ($error_class=null) | |
Constructor. | |
_PEAR () | |
Destructor (the emulated type of...). | |
& | getStaticProperty ($class, $var) |
If you have a class that's mostly/entirely static, and you need static properties, you can use this method to simulate them. | |
registerShutdownFunc ($func, $args=array()) | |
Use this function to register a shutdown method for static classes. | |
isError ($data, $code=null) | |
Tell whether a value is a PEAR error. | |
setErrorHandling ($mode=null, $options=null) | |
Sets how errors generated by this object should be handled. | |
expectError ($code= '*') | |
This method is used to tell which errors you expect to get. | |
popExpect () | |
This method pops one element off the expected error codes stack. | |
_checkDelExpect ($error_code) | |
This method checks unsets an error code if available. | |
delExpect ($error_code) | |
This method deletes all occurences of the specified element from the expected error codes stack. | |
& | raiseError ($message=null, $code=null, $mode=null, $options=null, $userinfo=null, $error_class=null, $skipmsg=false) |
This method is a wrapper that returns an instance of the configured error class with this object's default error handling applied. | |
& | throwError ($message=null, $code=null, $userinfo=null) |
Simpler form of raiseError with fewer options. | |
staticPushErrorHandling ($mode, $options=null) | |
staticPopErrorHandling () | |
pushErrorHandling ($mode, $options=null) | |
Push a new error handler on top of the error handler options stack. | |
popErrorHandling () | |
Pop the last error handler used. | |
loadExtension ($ext) | |
OS independant PHP extension load. |
Data Fields | |
$_servers = array() | |
$_configfile = null | |
$res = null | |
$username = null | |
$password = null | |
$attributes = array() | |
$rawAttributes = array() | |
$rawVendorAttributes = array() | |
$useStandardAttributes = true | |
Data Fields inherited from PEAR | |
$_debug = false | |
$_default_error_mode = null | |
$_default_error_options = null | |
$_default_error_handler = '' | |
$_error_class = 'PEAR_Error' | |
$_expected_errors = array() |
Definition at line 58 of file RADIUS.php.
Auth_RADIUS::addServer | ( | $servername = 'localhost' , |
|
$port = 0 , |
|||
$sharedSecret = 'testing123' , |
|||
$timeout = 3 , |
|||
$maxtries = 3 |
|||
) |
Adds a RADIUS server to the list of servers for requests.
At most 10 servers may be specified. When multiple servers are given, they are tried in round-robin fashion until a valid response is received
public
string | $servername | Servername or IP-Address |
integer | $port | Portnumber |
string | $sharedSecret | Shared secret |
integer | $timeout | Timeout for each request |
integer | $maxtries | Max. retries for each request |
Definition at line 148 of file RADIUS.php.
Auth_RADIUS::Auth_RADIUS | ( | ) |
Constructor.
Loads the RADIUS PECL/extension
Definition at line 128 of file RADIUS.php.
References PEAR\PEAR().
Referenced by Auth_RADIUS_Acct\Auth_RADIUS_Acct(), and Auth_RADIUS_PAP\Auth_RADIUS_PAP().
Auth_RADIUS::close | ( | ) |
Frees resources.
Calling this method is always a good idea, because all security relevant attributes are filled with Nullbytes to leave nothing in the mem.
public
Reimplemented in Auth_RADIUS_MSCHAPv2, and Auth_RADIUS_CHAP_MD5.
Definition at line 549 of file RADIUS.php.
Auth_RADIUS::createRequest | ( | ) |
Overwrite this.
public
Reimplemented in Auth_RADIUS_Acct, and Auth_RADIUS_PAP.
Definition at line 264 of file RADIUS.php.
Referenced by start().
Auth_RADIUS::dumpAttributes | ( | ) |
Prints known attributes received from the server.
public
Definition at line 243 of file RADIUS.php.
Auth_RADIUS::getAttributes | ( | ) |
Reads all received attributes after sending the request.
This methods stores known attributes in the property attributes, all attributes (including known attibutes) are stored in rawAttributes or rawVendorAttributes. NOTE: call this function also even if the request was rejected, because the Server returns usualy an errormessage
public
Definition at line 416 of file RADIUS.php.
References $attrib.
Auth_RADIUS::getError | ( | ) |
Returns an error message, if an error occurred.
public
Definition at line 159 of file RADIUS.php.
Referenced by send().
Auth_RADIUS::open | ( | ) |
Overwrite this.
public
Reimplemented in Auth_RADIUS_Acct, and Auth_RADIUS_PAP.
Definition at line 255 of file RADIUS.php.
Referenced by start().
Auth_RADIUS::putAttribute | ( | $attrib, | |
$value, | |||
$type = null |
|||
) |
Puts an attribute.
public
integer | $attrib | Attribute-number |
mixed | $port | Attribute-value |
type | $type | Attribute-type |
Definition at line 185 of file RADIUS.php.
References $attrib.
Referenced by putAuthAttributes(), Auth_RADIUS_PAP\putAuthAttributes(), Auth_RADIUS_CHAP_MD5\putAuthAttributes(), Auth_RADIUS_MSCHAPv1\putAuthAttributes(), Auth_RADIUS_MSCHAPv2\putAuthAttributes(), Auth_RADIUS_Acct\putAuthAttributes(), and putStandardAttributes().
Auth_RADIUS::putAuthAttributes | ( | ) |
Puts custom attributes.
public
Reimplemented in Auth_RADIUS_Acct, Auth_RADIUS_MSCHAPv2, Auth_RADIUS_MSCHAPv1, Auth_RADIUS_CHAP_MD5, and Auth_RADIUS_PAP.
Definition at line 296 of file RADIUS.php.
References putAttribute().
Referenced by start().
Auth_RADIUS::putConfigfile | ( | $file | ) |
Configures the radius library via external configurationfile.
public
string | $servername | Servername or IP-Address |
Definition at line 330 of file RADIUS.php.
References $file.
Referenced by start().
Auth_RADIUS::putServer | ( | $servername, | |
$port = 0 , |
|||
$sharedsecret = 'testing123' , |
|||
$timeout = 3 , |
|||
$maxtries = 3 |
|||
) |
Configures the radius library.
public
string | $servername | Servername or IP-Address |
integer | $port | Portnumber |
string | $sharedSecret | Shared secret |
integer | $timeout | Timeout for each request |
integer | $maxtries | Max. retries for each request |
Definition at line 315 of file RADIUS.php.
Referenced by start().
Auth_RADIUS::putStandardAttributes | ( | ) |
Puts standard attributes.
public
Definition at line 273 of file RADIUS.php.
References $GLOBALS, and putAttribute().
Referenced by start().
Auth_RADIUS::putVendorAttribute | ( | $vendor, | |
$attrib, | |||
$value, | |||
$type = null |
|||
) |
Puts a vendor-specific attribute.
public
integer | $vendor | Vendor (MSoft, Cisco, ...) |
integer | $attrib | Attribute-number |
mixed | $port | Attribute-value |
type | $type | Attribute-type |
Definition at line 216 of file RADIUS.php.
References $attrib.
Referenced by Auth_RADIUS_MSCHAPv1\putAuthAttributes(), and Auth_RADIUS_MSCHAPv2\putAuthAttributes().
Auth_RADIUS::send | ( | ) |
Sends a prepared RADIUS request and waits for a response.
public
Definition at line 375 of file RADIUS.php.
References getError(), and PEAR\raiseError().
Auth_RADIUS::setConfigfile | ( | $file | ) |
Sets the configuration-file.
public
string | $file | Path to the configuration file |
Definition at line 171 of file RADIUS.php.
References $file.
Auth_RADIUS::start | ( | ) |
Initiates a RADIUS request.
public
Definition at line 344 of file RADIUS.php.
References createRequest(), open(), putAuthAttributes(), putConfigfile(), putServer(), and putStandardAttributes().
Auth_RADIUS::$_configfile = null |
Definition at line 72 of file RADIUS.php.
Auth_RADIUS::$_servers = array() |
Definition at line 65 of file RADIUS.php.
Auth_RADIUS::$attributes = array() |
Definition at line 98 of file RADIUS.php.
Auth_RADIUS::$password = null |
Definition at line 91 of file RADIUS.php.
Referenced by Auth_RADIUS_PAP\Auth_RADIUS_PAP().
Auth_RADIUS::$rawAttributes = array() |
Definition at line 105 of file RADIUS.php.
Auth_RADIUS::$rawVendorAttributes = array() |
Definition at line 112 of file RADIUS.php.
Auth_RADIUS::$res = null |
Definition at line 79 of file RADIUS.php.
Auth_RADIUS::$username = null |
Definition at line 85 of file RADIUS.php.
Referenced by Auth_RADIUS_CHAP_MD5\Auth_RADIUS_CHAP_MD5(), and Auth_RADIUS_PAP\Auth_RADIUS_PAP().
Auth_RADIUS::$useStandardAttributes = true |
Definition at line 119 of file RADIUS.php.