-
Notifications
You must be signed in to change notification settings - Fork 0
client API methods session
hannsolo edited this page May 6, 2020
·
2 revisions
Create a session with the given credentials.
Close an existing session.
Returns the user name of the current session.
Returns the current session cookie value if any.
changePassword(currentPassword: string, newPassWord: string, options: IHTTPOptions = {}): Promise<boolean>
Change the password of the current user.
changeUser(user: string, options: IHTTPOptions = {}): Promise<boolean>
Log in as a different user.
getUserList(options: IHTTPOptions = {}): Promise<string[]>
Load a list of user names.
client.login("user", "password")
.then( () => {
client.getUserList()
.then ( (users) => {
console.log(users);
})
.catch(console.error)
.finally( () => {
client.logout();
})
})
.catch(console.error);
Documentation
-
Interfaces