ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
Auth_RADIUS_Acct Class Reference
+ Inheritance diagram for Auth_RADIUS_Acct:
+ Collaboration diagram for Auth_RADIUS_Acct:

Public Member Functions

 Auth_RADIUS_Acct ()
 Constructor. More...
 
 open ()
 Creates a RADIUS resource. More...
 
 createRequest ()
 Creates an accounting request. More...
 
 putAuthAttributes ()
 Put attributes for accounting. More...
 
- Public Member Functions inherited from Auth_RADIUS
 Auth_RADIUS ()
 Constructor. More...
 
 addServer ($servername='localhost', $port=0, $sharedSecret='testing123', $timeout=3, $maxtries=3)
 Adds a RADIUS server to the list of servers for requests. More...
 
 getError ()
 Returns an error message, if an error occurred. More...
 
 setConfigfile ($file)
 Sets the configuration-file. More...
 
 putAttribute ($attrib, $value, $type=null)
 Puts an attribute. More...
 
 putVendorAttribute ($vendor, $attrib, $value, $type=null)
 Puts a vendor-specific attribute. More...
 
 dumpAttributes ()
 Prints known attributes received from the server. More...
 
 open ()
 Overwrite this. More...
 
 createRequest ()
 Overwrite this. More...
 
 putStandardAttributes ()
 Puts standard attributes. More...
 
 putAuthAttributes ()
 Puts custom attributes. More...
 
 putServer ($servername, $port=0, $sharedsecret='testing123', $timeout=3, $maxtries=3)
 Configures the radius library. More...
 
 putConfigfile ($file)
 Configures the radius library via external configurationfile. More...
 
 start ()
 Initiates a RADIUS request. More...
 
 send ()
 Sends a prepared RADIUS request and waits for a response. More...
 
 getAttributes ()
 Reads all received attributes after sending the request. More...
 
 close ()
 Frees resources. More...
 
- Public Member Functions inherited from PEAR
 PEAR ($error_class=null)
 Constructor. More...
 
 _PEAR ()
 Destructor (the emulated type of...). More...
 
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. More...
 
 registerShutdownFunc ($func, $args=array())
 Use this function to register a shutdown method for static classes. More...
 
 isError ($data, $code=null)
 Tell whether a value is a PEAR error. More...
 
 setErrorHandling ($mode=null, $options=null)
 Sets how errors generated by this object should be handled. More...
 
 expectError ($code=' *')
 This method is used to tell which errors you expect to get. More...
 
 popExpect ()
 This method pops one element off the expected error codes stack. More...
 
 _checkDelExpect ($error_code)
 This method checks unsets an error code if available. More...
 
 delExpect ($error_code)
 This method deletes all occurences of the specified element from the expected error codes stack. More...
 
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. More...
 
throwError ($message=null, $code=null, $userinfo=null)
 Simpler form of raiseError with fewer options. More...
 
 staticPushErrorHandling ($mode, $options=null)
 
 staticPopErrorHandling ()
 
 pushErrorHandling ($mode, $options=null)
 Push a new error handler on top of the error handler options stack. More...
 
 popErrorHandling ()
 Pop the last error handler used. More...
 
 loadExtension ($ext)
 OS independant PHP extension load. More...
 

Data Fields

 $authentic = null
 
 $status_type = null
 
 $session_time = null
 
 $session_id = null
 
- Data Fields inherited from Auth_RADIUS
 $_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()
 

Detailed Description

Definition at line 845 of file RADIUS.php.

Member Function Documentation

◆ Auth_RADIUS_Acct()

Auth_RADIUS_Acct::Auth_RADIUS_Acct ( )

Constructor.

Generates a predefined session_id. We use the Remote-Address, the PID, and the Current user.

Returns
void

Definition at line 879 of file RADIUS.php.

880 {
881 $this->Auth_RADIUS();
882
883 if (isset($_SERVER)) {
884 $var = &$_SERVER;
885 } else {
886 $var = &$GLOBALS['HTTP_SERVER_VARS'];
887 }
888
889 $this->session_id = sprintf("%s:%d-%s", isset($var['REMOTE_ADDR']) ? $var['REMOTE_ADDR'] : '127.0.0.1' , getmypid(), get_current_user());
890 }
Auth_RADIUS()
Constructor.
Definition: RADIUS.php:128
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
Definition: CAS.php:276
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']

References $_SERVER, $GLOBALS, and Auth_RADIUS\Auth_RADIUS().

+ Here is the call graph for this function:

◆ createRequest()

Auth_RADIUS_Acct::createRequest ( )

Creates an accounting request.

Creates an accounting request. You MUST call this method before you can put any attribute.

Returns
bool true on success, false on error

Reimplemented from Auth_RADIUS.

Definition at line 917 of file RADIUS.php.

918 {
919 if (!radius_create_request($this->res, RADIUS_ACCOUNTING_REQUEST)) {
920 return false;
921 }
922 return true;
923 }

◆ open()

Auth_RADIUS_Acct::open ( )

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.

Returns
bool true on success, false on error

Reimplemented from Auth_RADIUS.

Definition at line 900 of file RADIUS.php.

901 {
902 $this->res = radius_acct_open();
903 if (!$this->res) {
904 return false;
905 }
906 return true;
907 }

◆ putAuthAttributes()

Auth_RADIUS_Acct::putAuthAttributes ( )

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.

Returns
void

Reimplemented from Auth_RADIUS.

Definition at line 932 of file RADIUS.php.

933 {
934 $this->putAttribute(RADIUS_ACCT_SESSION_ID, $this->session_id);
935 $this->putAttribute(RADIUS_ACCT_STATUS_TYPE, $this->status_type);
936 if (isset($this->session_time) && $this->status_type == RADIUS_STOP) {
937 $this->putAttribute(RADIUS_ACCT_SESSION_TIME, $this->session_time);
938 }
939 if (isset($this->authentic)) {
940 $this->putAttribute(RADIUS_ACCT_AUTHENTIC, $this->authentic);
941 }
942
943 }
putAttribute($attrib, $value, $type=null)
Puts an attribute.
Definition: RADIUS.php:185

References Auth_RADIUS\putAttribute().

+ Here is the call graph for this function:

Field Documentation

◆ $authentic

Auth_RADIUS_Acct::$authentic = null

Definition at line 852 of file RADIUS.php.

◆ $session_id

Auth_RADIUS_Acct::$session_id = null

Definition at line 871 of file RADIUS.php.

◆ $session_time

Auth_RADIUS_Acct::$session_time = null

Definition at line 865 of file RADIUS.php.

◆ $status_type

Auth_RADIUS_Acct::$status_type = null

Definition at line 859 of file RADIUS.php.


The documentation for this class was generated from the following file: