Spring 4 WebSockect over STOMP Authentication
问题 I'm developing a multiplayer game based on Spring 4 WebSocket. my server is stateless so in order to identify players i use tokens. after struggling for sometime with how to identify players over WebSockets i came up with this solution: on the client player registers like this: var sockjs = new SockJS("http://mygame/games/", null, {server : token}); this adds the token to the url, I have set up a filter using spring security: String requestURI = request.getRequestURI(); String[] parts =