|
@ -12,10 +12,12 @@ class DeegraphServer |
|
|
private string $ServerDomain; |
|
|
private string $ServerDomain; |
|
|
private int $Port; |
|
|
private int $Port; |
|
|
private string $Token; |
|
|
private string $Token; |
|
|
|
|
|
private string $Actor; |
|
|
private bool $AllowSelfSignedCerts; |
|
|
private bool $AllowSelfSignedCerts; |
|
|
|
|
|
|
|
|
public function __construct( |
|
|
public function __construct( |
|
|
string $token, |
|
|
string $token, |
|
|
|
|
|
string $actor, |
|
|
string $server = "localhost", |
|
|
string $server = "localhost", |
|
|
int $port = 8088, |
|
|
int $port = 8088, |
|
|
bool $allowSelfSignedCerts = false) |
|
|
bool $allowSelfSignedCerts = false) |
|
@ -23,6 +25,7 @@ class DeegraphServer |
|
|
$this->ServerDomain = $server; |
|
|
$this->ServerDomain = $server; |
|
|
$this->Port = $port; |
|
|
$this->Port = $port; |
|
|
$this->Token = $token; |
|
|
$this->Token = $token; |
|
|
|
|
|
$this->Actor = $actor; |
|
|
$this->AllowSelfSignedCerts = $allowSelfSignedCerts; |
|
|
$this->AllowSelfSignedCerts = $allowSelfSignedCerts; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -42,6 +45,7 @@ class DeegraphServer |
|
|
curl_setopt($ch, CURLOPT_HTTPHEADER, [ |
|
|
curl_setopt($ch, CURLOPT_HTTPHEADER, [ |
|
|
'Content-Type: application/json', |
|
|
'Content-Type: application/json', |
|
|
"Authorization: Bearer {$this->Token}", |
|
|
"Authorization: Bearer {$this->Token}", |
|
|
|
|
|
"X-Auxilium-Actor: {$this->Actor}", |
|
|
]); |
|
|
]); |
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
|
|
|
|
|
|
|
|