OctoPrintClient.browser
¶
-
OctoPrintClient.browser.
login
(username, password, remember, opts)¶ Logs the browser into OctoPrint, using the provided
username
andpassword
as credentials. Ifremember
is set totrue
, the session will also persist across browser restarts.Example:
OctoPrint.browser.login("myusername", "mypassword", true) .done(function(response) { // do something with the response });
- Arguments
username (string) – Username to log in with
password (string) – Password to log in with
remember (bool) – “Remember me”
opts (object) – Additional request options
- Returns Promise
A jQuery Promise for the request’s response
-
OctoPrintClient.browser.
passiveLogin
(opts)¶ Tries to perform a passive login into OctoPrint, using existing session data stored in the browser’s cookies.
- Arguments
opts (object) – Additional request options
- Returns Promise
A jQuery Promise for the request’s response
-
OctoPrintClient.browser.
logout
(opts)¶ Logs the browser out of OctoPrint.
- Arguments
opts (object) – Additional request options
- Returns Promise
A jQuery Promise for the request’s response