Avaya Client SDK

< Back to Package Overview

Authentication

The Customer Interaction Utilities SDK supports authentication on Email Templates & Email Signatures.

Set token property on AcConfiguration.serverInfo to the token. Set isGuest property on AcConfiguration to false.

AcConfiguration.serverInfo.token = token;
AcConfiguration.isGuest = false;

The sdk will then add the token to the Authentication header on all REST requests.

Workspaces Example:

var _acconfig = new AvayaCustomerInteractionUtilitiesClient.Config.AcConfiguration();
_acconfig.serverInfo.token = $cookies.get('UACCookieSession').replace('Bearer ', '');
_acconfig.isGuest = false;

var _acinstance = _acclient.createCustomerInteractionUtilitiesService(_acconfig);
acinstance.getAllTemplates();

Requesting An Authorisation Token

An authorisation token may be requested from Breeze as follows:

var scope = "standard";             // can be either standard or privileged
var username = "agent@example.com"; // the agent's LDAP username
var password = "password";          // the agent's LDAP password
var token = AgentController.generateToken(scope, username, password);

This method currently points at the ContextStoreRest service.