Hi Koen,
The authenticationInfo.tokens property accepts an array of strings which act as a whitelist. By setting
authenticationInfo: { enabled: true, tokens: ['Authorization'] }
you are instructing the token provider to search through a collection of tokens and apply it to the header when making a request. This token must be added to the token collection using
clientSession.setToken({header: 'Authorization', value: token});
before a request requiring the header to be set can be made.
For example...
const authToken = {header: 'Authorization', value: token};
// UAC Configuration for Avaya Customer Services SDK
const config = {
uacConfiguration: new AvayaCustomerServices.Config.UACConfiguration({
...
authenticationInfo: {enabled: true, tokens: ['Authorization']}
...
})
};
// Initialize the Avaya Customer Services SDK
const client = new AvayaCustomerServices(config);
// Start Client Session service
const clientSession = client.createClientSession();
// Set token to SDK token store
clientSession.setToken(authToken);
// Handle callback when configuration is loaded from UAC
clientSession.getConfiguration(authHandle).then((configuration) => {......}
Regards,
CIS Support Team