Question
BUPA
AU
Last activity: 25 Apr 2016 10:04 EDT
Pega CHAT Client to send authorisation token as socket header
Hi Team,
As a part of requirement in UBS, when Pega CHAT client snippet obtains a connection with the server via websocket, system has to send some authorisation token to the server to identify the request. This token is to be passed as a dynamic header of the request for socket.io connection. After going through the code we have understood that this might require a change in the chat.js file. Please confirm us how we can achieve the change?
We have to include something similar to below:
var socket = io("http://localhost", {
extraHeaders: {
'X-UBS-SISMA-EXAMPLE' : "My header value"
}
});
^^ something like that
I have the document with me but this document doesn't address our requirement. This document talks about event handling from Pega. Our requirement is to customize the client snippet to include dynamic header containing authorization token to pass through socket during communication.
This will help to identify the client chatting with the CSR agent. The token is to identify Web ChatUser from client side