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

Class: Auth_RADIUS

Source Location: /Auth_RADIUS-1.0.4/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 ]



Method Detail

Auth_RADIUS (Constructor)   [line 121]

void Auth_RADIUS( )

Constructor

Loads the RADIUS PECL/extension


[ Top ]

addServer   [line 141]

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

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

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

void dumpAttributes( )

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

[ Top ]

getAttributes   [line 404]

bool getAttributes( )

Reads all received attributes after sending the request.

This methos stores know attributes in the property attributes, all attributes (including known attibutes) are stored in rawAttributes or rawVendorAttributes. NOTE: call this functio 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 152]

string getError( )

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

[ Top ]

open   [line 246]

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

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

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

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

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

void putStandardAttributes( )

Puts standard attributes.
  • Access: public

[ Top ]

putVendorAttribute   [line 208]

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

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

void setConfigfile( string $file)

Sets the configuration-file.
  • Access: public

Parameters:

string   $file   —  Path to the configuration file

[ Top ]

start   [line 332]

bool start( )

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

[ Top ]


Documentation generated on Mon, 11 Mar 2019 10:14:10 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.