Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - col

#1
General Discussion / RADIUS Login to Firewall
August 07, 2019, 04:24:48 PM
Hello

We have a remote RADIUS server we want to use for authenticating when logging in to our firewall instance. When configured, it seems to be OK with the auth but we get the message "No page assigned to this user!".

I suspect I need to setup a REPLY-ATTRIBUTE but I am unsure on the syntax.

I created a Cisco AVPAIR: Group="admins" which hasn't worked. Can someone enlighten me please? :)

Thanks!
#2
General Discussion / Re: API Use with PHP
May 09, 2019, 12:54:47 PM
Ahhh silly me.

Working now, thanks!
#3
General Discussion / API Use with PHP
May 09, 2019, 12:37:57 PM
Hi All...

Not sure if this is the right board to post this in but here goes..

I'm trying to access the API's using a PHP script (only language I have some familiarity with) but struggling to get it to give any responses and the 'Help' documentation only shows examples in Python or cURL neither of which i'm familiar with, so got a bit stuck.

Here is the code i'm using (sensitive info removed), I've used similar code to get API's from other things before, so maybe i'm missing some syntaxing...


$api_key = "keyhere";
$api_secret = "secretehere";

$base_url = "https://<ip>/api";
$api_get_url = "/diagnostics/interface/getInterfaceNames";

$url_ints = $base_url.$api_get_url;

$get_opts = array('http' =>
    array(
        'method'  => 'GET',
        'header'  => 'auth='.$api_key.':'.$api_secret."\r\n" .'Content-Type: application/json'
    )
);

$get_context  = stream_context_create($get_opts);
$get_token = file_get_contents($url_ints, false,  $get_context);

$token_array = json_decode($get_token, true);

print_r ($token_array);


Any help would be appreciated.

Thanks!