Question

4
Replies
183
Views
SwarnenduM Member since 2012 11 posts
Infosys
Posted: 4 years ago
Last activity: 4 years 5 months ago
Closed

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

Pega Customer Service
Moderation Team has archived post
Share this page LinkedIn