SuperSocket icon indicating copy to clipboard operation
SuperSocket copied to clipboard

WebSocketServer with BasicAuthentification

Open optimry opened this issue 2 years ago • 1 comments

Hi Guys

Using the SuperSocket WebSocketServer is it possible to perform basic authentification on the http request before the upgrade to websocket? If so, any idea to where I should plugin my BasicAuthentificationHandler?

Thanks

optimry avatar Sep 13 '23 21:09 optimry

You can use HandshakeValidator:

https://github.com/kerryjiang/SuperSocket/blob/07d5a6f86601cbb7c76b2f18503103b3b232aede/test/SuperSocket.Tests/WebSocket/WebSocketBasicTest.cs#L163C103-L163C103

kerryjiang avatar Jan 09 '24 19:01 kerryjiang