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

Class: Auth_RADIUS

Source Location: /Auth_RADIUS-1.0.7/RADIUS.php

Class Overview

PEAR
   |
   --Auth_RADIUS

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 58]
class Auth_RADIUS

Abstract base class for RADIUS



[ Top ]


Class Variables

$attributes = array()

[line 98]

List of known attributes.

Type:   array


[ Top ]

$password =  null

[line 91]

Password for plaintext-authentication (PAP).

Type:   string


[ Top ]

$rawAttributes = array()

[line 105]

List of raw attributes.

Type:   array


[ Top ]

$rawVendorAttributes = array()

[line 112]

List of raw vendor specific attributes.

Type:   array


[ Top ]

$res =  null

[line 79]

Resource.

Type:   resource


[ Top ]

$username =  null

[line 85]

Username for authentication and accounting requests.

Type:   string


[ Top ]

$useStandardAttributes =  true

[line 119]

Switch whether we should put standard attributes or not

Type:   bool


[ Top ]



Method Detail

Auth_RADIUS (Constructor)   [line 128]

void Auth_RADIUS( )

Constructor

Loads the RADIUS PECL/extension


[ Top ]

addServer   [line 148]

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 549]

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 264]

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 243]

void dumpAttributes( )

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

[ Top ]

getAttributes   [line 416]

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 159]

string getError( )

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

[ Top ]

open   [line 255]

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 185]

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 296]

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 330]

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 315]

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 273]

void putStandardAttributes( )

Puts standard attributes.
  • Access: public

[ Top ]

putVendorAttribute   [line 216]

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 375]

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 171]

void setConfigfile( string $file)

Sets the configuration-file.
  • Access: public

Parameters:

string   $file     Path to the configuration file

[ Top ]

start   [line 344]

bool start( )

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

[ Top ]


Documentation generated on Mon, 25 Oct 2010 14:30:29 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.