how to authenticate a user, who use a myScript.js with javascript?
===

I provide a messaging system to my customer using a javascript and easyXDM. I have to provide this information to authorized users.

e.g. when Customer B send a message using this JS to me, I want to get sure whether the message comes from customer B.

How can I consider security steps in such case?

thanks in advance