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