|
Moodle
2.2.1
http://www.collinsharper.com
|


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 | |
Definition at line 58 of file RADIUS.php.
| 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 | ( | ) |
Constructor
Loads the RADIUS PECL/extension
Definition at line 128 of file RADIUS.php.


| 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.
| createRequest | ( | ) |
Overwrite this.
public
Reimplemented in Auth_RADIUS_Acct, and Auth_RADIUS_PAP.
Definition at line 264 of file RADIUS.php.

| dumpAttributes | ( | ) |
| 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.
| getError | ( | ) |
Returns an error message, if an error occurred.
public
Definition at line 159 of file RADIUS.php.

| open | ( | ) |
Overwrite this.
public
Reimplemented in Auth_RADIUS_Acct, and Auth_RADIUS_PAP.
Definition at line 255 of file RADIUS.php.

| 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.

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.


| putConfigfile | ( | $ | file | ) |
Configures the radius library via external configurationfile
public
| string | $servername | Servername or IP-Address |
Definition at line 330 of file RADIUS.php.

| 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.

Puts standard attributes.
public
Definition at line 273 of file RADIUS.php.


| 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.

| send | ( | ) |
Sends a prepared RADIUS request and waits for a response
public
Definition at line 375 of file RADIUS.php.

| setConfigfile | ( | $ | file | ) |
Sets the configuration-file.
public
| string | $file | Path to the configuration file |
Definition at line 171 of file RADIUS.php.
| start | ( | ) |
Initiates a RADIUS request.
public
Definition at line 344 of file RADIUS.php.

| $_configfile = null |
Definition at line 72 of file RADIUS.php.
| $_servers = array() |
Definition at line 65 of file RADIUS.php.
| $attributes = array() |
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.