-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.js
50 lines (43 loc) · 1.19 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
const {
Authentication,
Organization,
User,
Key,
Log,
Admin
} = require('./lib');
/*
Constructor:
Required:
baseUrl: Base URL to use for Axios requests. No trailing forward slash.
e.g. "https://yourPritunl.domain.com"
apiToken: Your API token for Axios requests.
apiSecret: Your API secret for Axios requests.
Optional:
selfSignedCaPath: If you are using a self signed cert, set the self signed ca cert here to allow Axios to use it.
Self signed cert can be gotten from Pritunl Web GUI
-> Settings
-> Advanced
-> Server SSL Certificate
-> Copy the contents to a file and give it the .pem extension
*/
module.exports = class Pritunl extends Authentication{
constructor(props){
super(props);
}
Organization(){
return new Organization(this.props);
}
User(){
return new User(this.props);
}
Key(){
return new Key(this.props);
}
Log(){
return new Log(this.props);
}
Admin(){
return new Admin(this.props);
}
}