Auth_RADIUS
[ class tree: Auth_RADIUS ] [ index: Auth_RADIUS ] [ all elements ]

Class: Auth_RADIUS

Source Location: /Auth_RADIUS-1.1.0/Auth/RADIUS.php

Class Overview


class Auth_RADIUS


Variables

Methods


Child classes:

Auth_RADIUS_PAP
class Auth_RADIUS_PAP
Auth_RADIUS_Acct
class Auth_RADIUS_Acct

Inherited Variables

Inherited Methods


Class Details

[line 55]
class Auth_RADIUS

Abstract base class for RADIUS



[ Top ]


Class Variables

$attributes = array()

[line 95]

List of known attributes.

Type:   array


[ Top ]

$password =  null

[line 88]

Password for plaintext-authentication (PAP).

Type:   string


[ Top ]

$rawAttributes = array()

[line 102]

List of raw attributes.

Type:   array


[ Top ]

$rawVendorAttributes = array()

[line 109]

List of raw vendor specific attributes.

Type:   array


[ Top ]

$res =  null

[line 76]

Resource.

Type:   resource


[ Top ]

$username =  null

[line 82]

Username for authentication and accounting requests.

Type:   string


[ Top ]

$useStandardAttributes =  true

[line 116]

Switch whether we should put standard attributes or not

Type:   bool


[ Top ]



Method Detail

__construct (Constructor)   [line 125]

void __construct( )

Constructor

Loads the RADIUS PECL/extension

  • Access: public

Overridden in child classes as:

Auth_RADIUS_PAP::__construct()
Constructor
Auth_RADIUS_CHAP_MD5::__construct()
Constructor
Auth_RADIUS_Acct::__construct()
Constructor

[ Top ]

addServer   [line 172]

void addServer( [string $servername = 'localhost'], [integer $port = 0], [string $sharedSecret = 'testing123'], [integer $timeout = 3], [integer $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

  • Access: public

Parameters:

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

[ Top ]

close   [line 555]

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

  • Access: public

Overridden in child classes as:

Auth_RADIUS_CHAP_MD5::close()
Frees resources.
Auth_RADIUS_MSCHAPv2::close()
Frees resources.

[ Top ]

createRequest   [line 279]

void createRequest( )

Overwrite this.
  • Access: public

Overridden in child classes as:

Auth_RADIUS_PAP::createRequest()
Creates an authentication request
Auth_RADIUS_Acct::createRequest()
Creates an accounting request

[ Top ]

dumpAttributes   [line 262]

void dumpAttributes( )

Prints known attributes received from the server.
  • Access: public

[ Top ]

getAttributes   [line 423]

bool 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

  • Return: true on success, false on error
  • Access: public

[ Top ]

getError   [line 182]

string getError( )

Returns an error message, if an error occurred.
  • Access: public

[ Top ]

loadExtension   [line 132]

void loadExtension( $ext)

  • Access: protected

Parameters:

   $ext     

[ Top ]

open   [line 272]

void open( )

Overwrite this.
  • Access: public

Overridden in child classes as:

Auth_RADIUS_PAP::open()
Creates a RADIUS resource
Auth_RADIUS_Acct::open()
Creates a RADIUS resource

[ Top ]

putAttribute   [line 206]

bool putAttribute( integer $attrib, $value, [type $type = null], mixed $port)

Puts an attribute.
  • Return: true on success, false on error
  • Access: public

Parameters:

integer   $attrib     Attribute-number
mixed   $port     Attribute-value
type   $type     Attribute-type
   $value     

[ Top ]

putAuthAttributes   [line 308]

void putAuthAttributes( )

Puts custom attributes.
  • Access: public

Overridden in child classes as:

Auth_RADIUS_PAP::putAuthAttributes()
Put authentication specific attributes
Auth_RADIUS_CHAP_MD5::putAuthAttributes()
Put CHAP-MD5 specific attributes
Auth_RADIUS_MSCHAPv1::putAuthAttributes()
Put MS-CHAPv1 specific attributes
Auth_RADIUS_MSCHAPv2::putAuthAttributes()
Put MS-CHAPv2 specific attributes
Auth_RADIUS_Acct::putAuthAttributes()
Put attributes for accounting.

[ Top ]

putConfigfile   [line 340]

bool putConfigfile( $file, string $servername)

Configures the radius library via external configurationfile
  • Return: true on success, false on error
  • Access: public

Parameters:

string   $servername     Servername or IP-Address
   $file     

[ Top ]

putServer   [line 326]

bool putServer( string $servername, [integer $port = 0], [ $sharedsecret = 'testing123'], [integer $timeout = 3], [integer $maxtries = 3], string $sharedSecret)

Configures the radius library.

Parameters:

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
   $sharedsecret     

[ Top ]

putStandardAttributes   [line 286]

void putStandardAttributes( )

Puts standard attributes.
  • Access: public

[ Top ]

putVendorAttribute   [line 236]

bool putVendorAttribute( integer $vendor, integer $attrib, $value, [type $type = null], mixed $port)

Puts a vendor-specific attribute.
  • Return: true on success, false on error
  • Access: public

Parameters:

integer   $vendor     Vendor (MSoft, Cisco, ...)
integer   $attrib     Attribute-number
mixed   $port     Attribute-value
type   $type     Attribute-type
   $value     

[ Top ]

send   [line 383]

mixed send( )

Sends a prepared RADIUS request and waits for a response
  • Return: true on success, false on reject, PEAR_Error on error
  • Access: public

[ Top ]

setConfigfile   [line 193]

void setConfigfile( string $file)

Sets the configuration-file.
  • Access: public

Parameters:

string   $file     Path to the configuration file

[ Top ]

start   [line 353]

bool start( )

Initiates a RADIUS request.
  • Return: true on success, false on errors
  • Access: public

[ Top ]


Documentation generated on Tue, 10 Feb 2015 01:00:03 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.