Moodle  2.2.1
http://www.collinsharper.com
Auth_RADIUS Class Reference
Inheritance diagram for Auth_RADIUS:
Collaboration diagram for Auth_RADIUS:

Public Member Functions

 Auth_RADIUS ()
 addServer ($servername= 'localhost', $port=0, $sharedSecret= 'testing123', $timeout=3, $maxtries=3)
 getError ()
 setConfigfile ($file)
 putAttribute ($attrib, $value, $type=null)
 putVendorAttribute ($vendor, $attrib, $value, $type=null)
 dumpAttributes ()
 open ()
 createRequest ()
 putStandardAttributes ()
 putAuthAttributes ()
 putServer ($servername, $port=0, $sharedsecret= 'testing123', $timeout=3, $maxtries=3)
 putConfigfile ($file)
 start ()
 send ()
 getAttributes ()
 close ()

Data Fields

 $_servers = array()
 $_configfile = null
 $res = null
 $username = null
 $password = null
 $attributes = array()
 $rawAttributes = array()
 $rawVendorAttributes = array()
 $useStandardAttributes = true

Detailed Description

Definition at line 58 of file RADIUS.php.


Member Function Documentation

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

Parameters:
string$servernameServername or IP-Address
integer$portPortnumber
string$sharedSecretShared secret
integer$timeoutTimeout for each request
integer$maxtriesMax. retries for each request
Returns:
void

Definition at line 148 of file RADIUS.php.

Constructor

Loads the RADIUS PECL/extension

Returns:
void

Definition at line 128 of file RADIUS.php.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Overwrite this.

public

Reimplemented in Auth_RADIUS_Acct, and Auth_RADIUS_PAP.

Definition at line 264 of file RADIUS.php.

Here is the caller graph for this function:

Prints known attributes received from the server.

public

Definition at line 243 of file RADIUS.php.

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

Returns:
bool true on success, false on error

Definition at line 416 of file RADIUS.php.

getError ( )

Returns an error message, if an error occurred.

public

Returns:
string

Definition at line 159 of file RADIUS.php.

Here is the caller graph for this function:

open ( )

Overwrite this.

public

Reimplemented in Auth_RADIUS_Acct, and Auth_RADIUS_PAP.

Definition at line 255 of file RADIUS.php.

Here is the caller graph for this function:

putAttribute ( attrib,
value,
type = null 
)

Puts an attribute.

public

Parameters:
integer$attribAttribute-number
mixed$portAttribute-value
type$typeAttribute-type
Returns:
bool true on success, false on error

Definition at line 185 of file RADIUS.php.

Here is the caller graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:

putConfigfile ( file)

Configures the radius library via external configurationfile

public

Parameters:
string$servernameServername or IP-Address
Returns:
bool true on success, false on error

Definition at line 330 of file RADIUS.php.

Here is the caller graph for this function:

putServer ( servername,
port = 0,
sharedsecret = 'testing123',
timeout = 3,
maxtries = 3 
)

Configures the radius library.

public

Parameters:
string$servernameServername or IP-Address
integer$portPortnumber
string$sharedSecretShared secret
integer$timeoutTimeout for each request
integer$maxtriesMax. retries for each request
Returns:
bool true on success, false on error
See also:
addServer()

Definition at line 315 of file RADIUS.php.

Here is the caller graph for this function:

Puts standard attributes.

public

Definition at line 273 of file RADIUS.php.

Here is the call graph for this function:

Here is the caller graph for this function:

putVendorAttribute ( vendor,
attrib,
value,
type = null 
)

Puts a vendor-specific attribute.

public

Parameters:
integer$vendorVendor (MSoft, Cisco, ...)
integer$attribAttribute-number
mixed$portAttribute-value
type$typeAttribute-type
Returns:
bool true on success, false on error

Definition at line 216 of file RADIUS.php.

Here is the caller graph for this function:

send ( )

Sends a prepared RADIUS request and waits for a response

public

Returns:
mixed true on success, false on reject, PEAR_Error on error

Definition at line 375 of file RADIUS.php.

Here is the call graph for this function:

setConfigfile ( file)

Sets the configuration-file.

public

Parameters:
string$filePath to the configuration file
Returns:
void

Definition at line 171 of file RADIUS.php.

start ( )

Initiates a RADIUS request.

public

Returns:
bool true on success, false on errors

Definition at line 344 of file RADIUS.php.

Here is the call graph for this function:


Field Documentation

$_configfile = null

Definition at line 72 of file RADIUS.php.

$_servers = array()

Definition at line 65 of file RADIUS.php.

Definition at line 98 of file RADIUS.php.

$password = null

Definition at line 91 of file RADIUS.php.

$rawAttributes = array()

Definition at line 105 of file RADIUS.php.

$rawVendorAttributes = array()

Definition at line 112 of file RADIUS.php.

$res = null

Definition at line 79 of file RADIUS.php.

$username = null

Definition at line 85 of file RADIUS.php.

$useStandardAttributes = true

Definition at line 119 of file RADIUS.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations