You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is possible to use a secret key instead of password for authentication.
30
+
31
+
```php
32
+
$client = new \PleskX\Api\Client($host);
33
+
$client->setSecretKey($secretKey)
34
+
```
35
+
36
+
In case of Plesk extension creation one can use an internal mechanism to access XML-RPC API. It does not require to pass authentication because the extension works in the context of Plesk.
37
+
38
+
```php
39
+
$client = new \PleskX\Api\InternalClient();
40
+
$protocols = $client->server()->getProtos();
41
+
```
42
+
43
+
For additional examples see tests/ directory.
44
+
13
45
## How to Run Unit Tests
14
46
15
47
One the possible ways to become familiar with the library is to check the unit tests.
@@ -27,4 +59,3 @@ To use custom port one can provide a URL (e.g. for Docker container):
27
59
* Install Node.js
28
60
* Install dependencies via `npm install` command
29
61
* Run `REMOTE_HOST=your-plesk-host.dom REMOTE_PASSWORD=password grunt watch:test`
0 commit comments