0

We are using camel web socket component for publishing real time data. We want to authenticate clients so if user is authorised then he/she should be able to access that websocket url. Please let me know is there any standard way which camel provides.

user1047873
  • 230
  • 3
  • 8
  • 28

2 Answers2

1

You can pass on a unique key when new socket is opened.

socket = new WebSocket("ws://example.com:port/uniquekey",'chat');

Then before the sending the handshake, extract the uniquekey from header and send the handshake if uniquekey passes necessary checks.

user2288650
  • 412
  • 1
  • 6
  • 23
0

You can use Apache Shiro with the corresponding Camel component to add authentication, authorization.

mgyongyosi
  • 2,557
  • 2
  • 13
  • 20