We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 75168e3 commit b189f5bCopy full SHA for b189f5b
src/restclient.js
@@ -45,6 +45,32 @@ class GlpiRestClient {
45
})
46
}
47
48
+ initSessionByCredentials (userName, userPassword) {
49
+ return new Promise((resolve, reject) => {
50
+ try {
51
+ const data = {
52
+ function: 'initSessionByCredentials',
53
+ endpoint: 'initSession',
54
+ method: 'GET',
55
+ url: this._url,
56
+ appToken: this._appToken,
57
+ userName,
58
+ userPassword
59
+ }
60
+
61
+ const myRequest = prepareRequest(data)
62
63
+ this._makeRequest(myRequest, (response) => {
64
+ resolve (
65
+ response
66
+ )
67
+ })
68
69
+ catch (err) {
70
+ reject(err)
71
72
73
74
75
76
export default GlpiRestClient
0 commit comments