[ Index ] |
PHP Cross Reference of Unnamed Project |
[Source view] [Print] [Project Stats]
Client implementation of RADIUS. This are wrapper classes for the RADIUS PECL. Provides RADIUS Authentication (RFC2865) and RADIUS Accounting (RFC2866).
Author: | Michael Bretterklieber <michael@bretterklieber.com> |
Version: | $Revision$ |
File Size: | 1008 lines (29 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
Auth_RADIUS:: (18 methods):
__construct()
loadExtension()
addServer()
getError()
setConfigfile()
putAttribute()
putVendorAttribute()
dumpAttributes()
open()
createRequest()
putStandardAttributes()
putAuthAttributes()
putServer()
putConfigfile()
start()
send()
getAttributes()
close()
Auth_RADIUS_PAP:: (4 methods):
__construct()
open()
createRequest()
putAuthAttributes()
Auth_RADIUS_CHAP_MD5:: (3 methods):
__construct()
putAuthAttributes()
close()
Auth_RADIUS_MSCHAPv1:: (1 method):
putAuthAttributes()
Auth_RADIUS_MSCHAPv2:: (2 methods):
putAuthAttributes()
close()
Auth_RADIUS_Acct:: (4 methods):
__construct()
open()
createRequest()
putAuthAttributes()
Auth_RADIUS_Acct_Start:: (0 methods):
Auth_RADIUS_Acct_Stop:: (0 methods):
Auth_RADIUS_Acct_Update:: (0 methods):
Auth_RADIUS_Exception:: (0 methods):
Class: Auth_RADIUS - X-Ref
class Auth_RADIUS__construct() X-Ref |
Constructor Loads the RADIUS PECL/extension return: void |
loadExtension($ext) X-Ref |
No description |
addServer($servername = 'localhost', $port = 0, $sharedSecret = 'testing123', $timeout = 3, $maxtries = 3) X-Ref |
No description |
getError() X-Ref |
Returns an error message, if an error occurred. return: string |
setConfigfile($file) X-Ref |
Sets the configuration-file. param: string $file Path to the configuration file return: void |
putAttribute($attrib, $value, $type = null) X-Ref |
Puts an attribute. param: integer $attrib Attribute-number param: mixed $port Attribute-value param: type $type Attribute-type return: bool true on success, false on error |
putVendorAttribute($vendor, $attrib, $value, $type = null) X-Ref |
Puts a vendor-specific attribute. param: integer $vendor Vendor (MSoft, Cisco, ...) param: integer $attrib Attribute-number param: mixed $port Attribute-value param: type $type Attribute-type return: bool true on success, false on error |
dumpAttributes() X-Ref |
Prints known attributes received from the server. |
open() X-Ref |
Overwrite this. |
createRequest() X-Ref |
Overwrite this. |
putStandardAttributes() X-Ref |
Puts standard attributes. |
putAuthAttributes() X-Ref |
Puts custom attributes. |
putServer($servername, $port = 0, $sharedsecret = 'testing123', $timeout = 3, $maxtries = 3) X-Ref |
Configures the radius library. param: string $servername Servername or IP-Address param: integer $port Portnumber param: string $sharedSecret Shared secret param: integer $timeout Timeout for each request param: integer $maxtries Max. retries for each request return: bool true on success, false on error |
putConfigfile($file) X-Ref |
Configures the radius library via external configurationfile param: string $servername Servername or IP-Address return: bool true on success, false on error |
start() X-Ref |
Initiates a RADIUS request. return: bool true on success, false on errors |
send() X-Ref |
Sends a prepared RADIUS request and waits for a response return: mixed true on success, false on reject, PEAR_Error on error |
getAttributes() X-Ref |
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 return: bool true on success, false on error |
close() X-Ref |
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. |
Class: Auth_RADIUS_PAP - X-Ref
class Auth_RADIUS_PAP__construct($username = null, $password = null) X-Ref |
Constructor param: string $username Username param: string $password Password return: void |
open() X-Ref |
Creates a RADIUS resource Creates a RADIUS resource for authentication. This should be the first call before you make any other things with the library. return: bool true on success, false on error |
createRequest() X-Ref |
Creates an authentication request Creates an authentication request. You MUST call this method before you can put any attribute return: bool true on success, false on error |
putAuthAttributes() X-Ref |
Put authentication specific attributes return: void |
Class: Auth_RADIUS_CHAP_MD5 - X-Ref
class Auth_RADIUS_CHAP_MD5__construct($username = null, $challenge = null, $chapid = 1) X-Ref |
Constructor param: string $username Username param: string $challenge 8 Bytes Challenge (binary) param: integer $chapid Requestnumber return: void |
putAuthAttributes() X-Ref |
Put CHAP-MD5 specific attributes For authenticating using CHAP-MD5 via RADIUS you have to put the challenge and the response. The chapid is inserted in the first byte of the response. return: void |
close() X-Ref |
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. |
Class: Auth_RADIUS_MSCHAPv1 - X-Ref
class Auth_RADIUS_MSCHAPv1putAuthAttributes() X-Ref |
Put MS-CHAPv1 specific attributes For authenticating using MS-CHAPv1 via RADIUS you have to put the challenge and the response. The response has this structure: struct rad_mschapvalue { u_char ident; u_char flags; u_char lm_response[24]; u_char response[24]; }; return: void |
Class: Auth_RADIUS_MSCHAPv2 - X-Ref
class Auth_RADIUS_MSCHAPv2putAuthAttributes() X-Ref |
Put MS-CHAPv2 specific attributes For authenticating using MS-CHAPv1 via RADIUS you have to put the challenge and the response. The response has this structure: struct rad_mschapv2value { u_char ident; u_char flags; u_char pchallenge[16]; u_char reserved[8]; u_char response[24]; }; where pchallenge is the peer challenge. Like for MS-CHAPv1 we set the flags field to 1. return: void |
close() X-Ref |
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. |
Class: Auth_RADIUS_Acct - X-Ref
class Auth_RADIUS_Acct__construct() X-Ref |
Constructor Generates a predefined session_id. We use the Remote-Address, the PID, and the Current user. return: void |
open() X-Ref |
Creates a RADIUS resource Creates a RADIUS resource for accounting. This should be the first call before you make any other things with the library. return: bool true on success, false on error |
createRequest() X-Ref |
Creates an accounting request Creates an accounting request. You MUST call this method before you can put any attribute. return: bool true on success, false on error |
putAuthAttributes() X-Ref |
Put attributes for accounting. Here we put some accounting values. There many more attributes for accounting, but for web-applications only certain attributes make sense. return: void |
Class: Auth_RADIUS_Acct_Start - X-Ref
class Auth_RADIUS_Acct_StartClass: Auth_RADIUS_Acct_Stop - X-Ref
class Auth_RADIUS_Acct_StartClass: Auth_RADIUS_Acct_Update - X-Ref
class Auth_RADIUS_Acct_UpdateClass: Auth_RADIUS_Exception - X-Ref
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |