-
Notifications
You must be signed in to change notification settings - Fork 47
Closed
Description
I have checked and the Pear_CHAP.php
file is available.
Any idea why this is happening?
Here's the code I'm using. The error occurs when using MSCHAPv2, PAP has been tested and works fine:
$radius = new \Dapphp\Radius\Radius();
$radius->setServer($radius_server['server'])
->setSecret($radius_server['shared_secret'])
->setNasIpAddress($radius_server['nas_ip_address']);
/**
* Send auth request, select method based on protocol value
* can be PAP, CHAP, MSCHAPv1 or MSCHAPv2
*/
switch ($radius_server['protocol']) {
case 'PAP':
$response = $radius->accessRequest($_REQUEST['radius_username'], $_REQUEST['radius_password']);
break;
case 'CHAP':
$radius->setChapPassword($_REQUEST['radius_password']);
$response = $radius->accessRequest($_REQUEST['radius_username']);
break;
case 'MSCHAPv1':
$radius->setMSChapPassword($_REQUEST['radius_password']);
$response = $radius->accessRequest($_REQUEST['radius_username']);
break;
case 'MSCHAPv2':
$response = $radius->accessRequestEapMsChapV2($_REQUEST['radius_username'], $_REQUEST['radius_password']);
break;
default:
$response = $radius->accessRequest($_REQUEST['radius_username'], $_REQUEST['radius_password']);
break;
}
Metadata
Metadata
Assignees
Labels
No labels