I have a CISCO and I want to authenticate users with RADIUS using PHP. CISCO has its own vendor and attributes and I have to set them in my PHP scripts. I am using PECL RADIUS API.
This is my sample code:
$radius = radius_auth_open();
radius_add_server($radius, $ip_address, $port, $shared_secret, 5, 3);
radius_create_request($radius, RADIUS_ACCESS_REQUEST);
// How to set CISCO attributes here?
$result = radius_send_request($radius);
I've tried radius_put_attr
, radius_put_string
, radius_put_vendor_attr
, radius_put_vendor_string
and other methods but none of them works.
I've tried another open source library (Pure PHP Radius) that uses Sockets and UDP to communicate with RADIUS server but I cannot set my own attributes either.
There is not enough examples out there so any help would be appreciated.