new update
parent
21acf21971
commit
9e7a4bd4da
|
@ -5,6 +5,7 @@ require_once 'vendor/autoload.php';
|
||||||
|
|
||||||
class SASConnector{
|
class SASConnector{
|
||||||
|
|
||||||
|
|
||||||
private $client;
|
private $client;
|
||||||
private $host;
|
private $host;
|
||||||
private $username;
|
private $username;
|
||||||
|
|
|
@ -6,6 +6,7 @@ $api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
||||||
|
|
||||||
$api->login();
|
$api->login();
|
||||||
|
|
||||||
|
|
||||||
$res = $api->post('user/activate', [
|
$res = $api->post('user/activate', [
|
||||||
"method" => "credit",
|
"method" => "credit",
|
||||||
"pin" => "",
|
"pin" => "",
|
||||||
|
|
1
aes.php
1
aes.php
|
@ -6,6 +6,7 @@
|
||||||
* Time: 5:09 PM
|
* Time: 5:09 PM
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/* Author: Cody Phillips
|
/* Author: Cody Phillips
|
||||||
* Company: Phillips Data
|
* Company: Phillips Data
|
||||||
* Website: www.phpaes.com, www.phillipsdata.com
|
* Website: www.phpaes.com, www.phillipsdata.com
|
||||||
|
|
|
@ -3,3 +3,4 @@
|
||||||
"guzzlehttp/guzzle": "~6.0"
|
"guzzlehttp/guzzle": "~6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ require_once 'SASConnector.php';
|
||||||
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
||||||
$api->login();
|
$api->login();
|
||||||
|
|
||||||
|
|
||||||
$res = $api->post('manager', [
|
$res = $api->post('manager', [
|
||||||
"username" => "test_manager2",
|
"username" => "test_manager2",
|
||||||
"enabled" => 1,
|
"enabled" => 1,
|
||||||
|
|
|
@ -5,6 +5,7 @@ require_once 'SASConnector.php';
|
||||||
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
||||||
$api->login();
|
$api->login();
|
||||||
|
|
||||||
|
|
||||||
$res = $api->post('profile', [
|
$res = $api->post('profile', [
|
||||||
"name" => "test profile",
|
"name" => "test profile",
|
||||||
"enabled" => 1,
|
"enabled" => 1,
|
||||||
|
|
|
@ -5,6 +5,7 @@ require_once 'SASConnector.php';
|
||||||
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
||||||
$api->login();
|
$api->login();
|
||||||
|
|
||||||
|
|
||||||
$res = $api->post('user', [
|
$res = $api->post('user', [
|
||||||
"username" => "testusertest23",
|
"username" => "testusertest23",
|
||||||
"enabled" => 1,
|
"enabled" => 1,
|
||||||
|
|
|
@ -5,6 +5,7 @@ require_once 'SASConnector.php';
|
||||||
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
||||||
$api->login();
|
$api->login();
|
||||||
|
|
||||||
|
|
||||||
$res = $api->delete('manager/id', [
|
$res = $api->delete('manager/id', [
|
||||||
"page" => 1,
|
"page" => 1,
|
||||||
"count" => 10,
|
"count" => 10,
|
||||||
|
|
|
@ -5,6 +5,7 @@ require_once 'SASConnector.php';
|
||||||
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
||||||
$api->login();
|
$api->login();
|
||||||
|
|
||||||
|
|
||||||
$res = $api->delete('profile/id', []);
|
$res = $api->delete('profile/id', []);
|
||||||
|
|
||||||
print_r(json_decode($res));
|
print_r(json_decode($res));
|
||||||
|
|
|
@ -5,6 +5,7 @@ require_once 'SASConnector.php';
|
||||||
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
||||||
$api->login();
|
$api->login();
|
||||||
|
|
||||||
|
|
||||||
$res = $api->delete('user/id', []);
|
$res = $api->delete('user/id', []);
|
||||||
|
|
||||||
print_r(json_decode($res));
|
print_r(json_decode($res));
|
||||||
|
|
1
test.php
1
test.php
|
@ -6,3 +6,4 @@ $api = new SASConnector('demo4.sasradius.com', 'admin', 'snonosystems');
|
||||||
$api->login();
|
$api->login();
|
||||||
$res = $api->post('index/user', []);
|
$res = $api->post('index/user', []);
|
||||||
print_r(json_decode($res));
|
print_r(json_decode($res));
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ require_once 'SASConnector.php';
|
||||||
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
||||||
$api->login();
|
$api->login();
|
||||||
|
|
||||||
|
|
||||||
$res = $api->post('manager/128', [
|
$res = $api->post('manager/128', [
|
||||||
"enabled" => 1,
|
"enabled" => 1,
|
||||||
"password" => null,
|
"password" => null,
|
||||||
|
|
|
@ -5,6 +5,7 @@ require_once 'SASConnector.php';
|
||||||
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
||||||
$api->login();
|
$api->login();
|
||||||
|
|
||||||
|
|
||||||
$res = $api->post('profile/31', [
|
$res = $api->post('profile/31', [
|
||||||
"name" => "testprofiletest",
|
"name" => "testprofiletest",
|
||||||
"enabled" => 1,
|
"enabled" => 1,
|
||||||
|
|
|
@ -5,6 +5,7 @@ require_once 'SASConnector.php';
|
||||||
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
||||||
$api->login();
|
$api->login();
|
||||||
|
|
||||||
|
|
||||||
$res = $api->post('user/id', [
|
$res = $api->post('user/id', [
|
||||||
"enabled" => 1,
|
"enabled" => 1,
|
||||||
"password" => null,
|
"password" => null,
|
||||||
|
|
Loading…
Reference in New Issue