login
Performs SSO login.
Look at CTLive Agent Login and Logout for more information
Parameters:
Name | Mandatory | Type | Description |
---|---|---|---|
jwt_token | NO | string | A json web token to perform authentication. |
enableVideo | no | boolean | Flag to enable video operations for the agent |
enableBlur | no | boolean | Flag to enable video blur for the agent |
callbackFN | no | JS function | Callback function to be notified when logout from CTLive is performed. It returns the logout reason that can be one of the following strings:
|
Returns:
Type | Description |
---|---|
JS Promise | A Javascript Promise that returns an object with the result of the login request. |
Example:
LIVECAHT.login(null, false, false, myCB)
.then(function (data) {
console.log("[CTLIVE WIDGET] Login", data);
})
.catch(function () {
console.log("[CTLIVE WIDGET] [ERROR] Login");
});
function myCB (reason) {
console.log("Logout from CTLive with reason " + reason);
};