Implements Radius authentication using Pure PHP radius class as downloaded from http://www.phpkode.com/scripts/item/pure-php-radius-class/

This class is a wrapper around the Pure PHP radius class by SysCo systemes de communication sa see library folder for specific copyright and license information

Check the constructor for required config parameters.

package Gems
subpackage User
copyright Copyright (c) 2011 Erasmus MC
license New BSD License
since Class available since version 1.5

 Methods

Constructor

__construct(array $config = array()) : void

Supported params for $config are:

  • ip = Ip address of the Radius server.
  • sharedsecret = The shared secret.
  • suffix = Suffix for the Radius server.
  • timeout = Timeout in seconds, default = 5.
  • authenticationport = Authentication port, default = 1812.
  • accountingport = Accounting port, default = 1813.

The minimal options are ip and shared secret, all others are optional

Parameters

$config

array

Array of user-specified config options.

authenticate() - defined by \Zend_Auth_Adapter_Interface. This method is called to attempt an authenication. Previous to this call, this adapter would have already been configured with all necessary information to successfully connect to a Radius server and attempt to find a record matching the provided identity.

authenticate() : \Zend_Auth_Result

Exceptions

\Zend_Auth_Adapter_Exception if answering the authentication query is impossible

Returns

\Zend_Auth_Result

setCredential() - set the credential value to be used

setCredential(string $credential) : \Gems_User_Adapter_Radius

Parameters

$credential

string

Returns

\Gems_User_Adapter_RadiusProvides a fluent interface

setIdentity() - set the value to be used as the identity

setIdentity(string $value) : \Gems_User_Adapter_Radius

Parameters

$value

string

Returns

\Gems_User_Adapter_RadiusProvides a fluent interface

_authenticateCreateAuthResult() - This method creates a \Zend_Auth_Result object from the information that has been collected during the authenticate() attempt.

_authenticateCreateAuthResult() : \Zend_Auth_Result

Returns

\Zend_Auth_Result

_authenticateSetup() - This method abstracts the steps involved with making sure that this adapter was indeed setup properly with all required peices of information.

_authenticateSetup() : true

Exceptions

\Gems_Exception_Coding - in the event that setup was not done properly

Returns

true

 Properties

 

Accounting port for Radius server

$_accountingPort : integer

Default

1813
 

$_authenticateResultInfo

$_authenticateResultInfo : array

Default

null
 

Authentication port for Radius server

$_authenticationPort : integer

Default

1812
 

$_credential - Credential values

$_credential : string

Default

null
 

$_identity - Identity value

$_identity : string

Default

null
 

IP addres of the Radius server

$_ip : string

Default

null
 

The actual Radius object

$_radius : \Radius

Default

null
 

Shared secret for the Radius server

$_sharedSecret : string

Default

null
 

Suffix for Radius server

$_suffix : string

Default

null
 

Timeout for Radius server in seconds

$_timeout : integer

Default

5