tag:blogger.com,1999:blog-523151633387570637.post3167207632826607442..comments2023-07-13T05:29:34.681-07:00Comments on Sunit Katkar's blog: Spring 4 WebSockets with SockJS, STOMP and Spring Security 3.2Sunithttp://www.blogger.com/profile/17473475495055036179noreply@blogger.comBlogger16125tag:blogger.com,1999:blog-523151633387570637.post-45489061988996853102016-03-01T11:14:28.788-08:002016-03-01T11:14:28.788-08:00@Nitesh Gupta
Thank you for your kind words. Glad ...@Nitesh Gupta<br />Thank you for your kind words. Glad this helped you.Sunithttps://www.blogger.com/profile/17473475495055036179noreply@blogger.comtag:blogger.com,1999:blog-523151633387570637.post-1914006639219579432016-03-01T10:02:39.334-08:002016-03-01T10:02:39.334-08:00One of the best examples I came across. Even loggi...One of the best examples I came across. Even logging and Java doc is impressive. Thanks!!!<br /><br />Nitesh Guptahttps://www.blogger.com/profile/11416190002748346943noreply@blogger.comtag:blogger.com,1999:blog-523151633387570637.post-81691518486034328522014-11-12T10:01:19.309-08:002014-11-12T10:01:19.309-08:00@Stephane The Techie ...
In my example applicatio...@Stephane The Techie ...<br /><br />In my example application, there is a regular login form provided by Spring security. Look at the security XML config. <br /><br />The gist of it is that once a user logs in and is authenticated, Spring security provides the authentication details via the Principal object. For all other subsequent requests this is available as there is a session which is created after the login.<br /><br />I understand your question as to how the web socket requests continue to work when there is no explicit passing of username and password. <br /><br />I would have to look into it myself. A good question by you. I am purely guessing that the Spring implementation of websockets (with sockjs integration on the server side) takes care of passing the user credentials along with every websocket request.<br /><br />This is purely a guess and not an answer. Sorry even I dont know the concrete reason.Sunithttps://www.blogger.com/profile/17473475495055036179noreply@blogger.comtag:blogger.com,1999:blog-523151633387570637.post-39020081170544972402014-11-12T07:19:23.651-08:002014-11-12T07:19:23.651-08:00Hello,
May I ask you if you could elaborate on yo...Hello,<br /><br />May I ask you if you could elaborate on your following statement ? "Notice that we dont pass in username and password as Spring Security has already provided the server with the Principal object containing user credentials".<br /><br />My AngularJS app gets a 401 response on the handshake.<br /><br />On the HTTP requests, the user credentials are added with an AngularJS interceptor.<br /><br />I'm puzzled on how to add the user credentials to the web socket requests.<br /><br />Thanks !<br /><br />StephaneAnonymoushttps://www.blogger.com/profile/12488006180803885323noreply@blogger.comtag:blogger.com,1999:blog-523151633387570637.post-52120466402262192122014-11-03T21:08:43.634-08:002014-11-03T21:08:43.634-08:00To: Rajashekhar P
I did not understand clearly wh...To: Rajashekhar P<br /><br />I did not understand clearly what you mean by 'is it support for java client'?<br /><br />But trying to guess what you meant, let me attempt an answer -<br />The example I posted is about how a web browser can open a 'websocket' connection to the server and then communicate over it. So in a sense the 'browser is the client' for the server running the websockets application.<br /><br />If you are thinking about a regular client server application then yes this is such an application but with a difference that the communication protocol is 'websockets' and the client is a browser. If any other type of client you develop can provide support for websockets then definitely you can use that. <br /><br />Hope I have guessed your question correctly and answered.Sunithttps://www.blogger.com/profile/17473475495055036179noreply@blogger.comtag:blogger.com,1999:blog-523151633387570637.post-33247590484893272142014-11-03T02:25:13.235-08:002014-11-03T02:25:13.235-08:00Hi sunit very nice post..
Is it support for java c...Hi sunit very nice post..<br />Is it support for java client...<br />or any other?Anonymoushttps://www.blogger.com/profile/15868122919548877918noreply@blogger.comtag:blogger.com,1999:blog-523151633387570637.post-6447503521212287422014-09-03T14:49:32.093-07:002014-09-03T14:49:32.093-07:00This was extremely helpful and very well done. So ...This was <b>extremely</b> helpful and very well done. So often the examples you find in blog posts -- when learning something new -- are too simplistic and you cannot easily adapt them to "real word" use. This post hits the sweet spot. Thanks so much for posting it!DilbertWannaBehttps://www.blogger.com/profile/06545629712944769218noreply@blogger.comtag:blogger.com,1999:blog-523151633387570637.post-17291473950511472242014-09-01T05:04:23.341-07:002014-09-01T05:04:23.341-07:00To: Harshad Ladhe
Just dont use the security rela...To: Harshad Ladhe<br /><br />Just dont use the security related configuration in the XML. Use Spring Source Tool Suite (STS) to create a plain Spring MVC project. It will not have any security configurations in the XML. Then its easy to follow the techniques as in the blog post to create what you want.Sunithttps://www.blogger.com/profile/17473475495055036179noreply@blogger.comtag:blogger.com,1999:blog-523151633387570637.post-35502240806808215172014-09-01T04:45:27.315-07:002014-09-01T04:45:27.315-07:00I want help in doing this example without security...I want help in doing this example without security module. Can anyone help me or give me a link where it is located???Anonymoushttps://www.blogger.com/profile/05794062273718952391noreply@blogger.comtag:blogger.com,1999:blog-523151633387570637.post-18184941027989266302014-09-01T04:45:03.261-07:002014-09-01T04:45:03.261-07:00I want help in doing this example without security...I want help in doing this example without security module. Can anyone help me or give me a link where it is located???Anonymoushttps://www.blogger.com/profile/05794062273718952391noreply@blogger.comtag:blogger.com,1999:blog-523151633387570637.post-38774475522761163582014-06-26T07:58:53.003-07:002014-06-26T07:58:53.003-07:00Thanks for the post. As far as I understand, you p...Thanks for the post. As far as I understand, you permit WebSocket URLs, so they are not secured. Why is this so? For example, with Ajax requests, we can add csrf header and we can communicate securely. Can we do something similar with SockJS or Stomp?Meribaldhttps://www.blogger.com/profile/17880770102480160658noreply@blogger.comtag:blogger.com,1999:blog-523151633387570637.post-78584429646529009862014-03-17T21:26:45.349-07:002014-03-17T21:26:45.349-07:00Hello Kencrisjohn de Guzman,
Thank you for apprec...Hello Kencrisjohn de Guzman,<br /><br />Thank you for appreciating my post.<br /><br />Yes you can use websockets for creating multi-player games. With long polling you dont really have a full duplex communication channel and this can be problematic for games which require high level of two way communications. Websockets are full duplex, i.e. its similar to a dedicated native socket connection between your browser and server. This will surely help in rapid communication between server and browser for a communication intensive application like games.<br /><br />Sunithttps://www.blogger.com/profile/17473475495055036179noreply@blogger.comtag:blogger.com,1999:blog-523151633387570637.post-15398143793295791732014-03-17T19:35:52.356-07:002014-03-17T19:35:52.356-07:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/16618694743037099247noreply@blogger.comtag:blogger.com,1999:blog-523151633387570637.post-5194797511666594962014-03-17T19:35:19.402-07:002014-03-17T19:35:19.402-07:00What a great post. Very helpful. I just have one q...What a great post. Very helpful. I just have one question. Do this technology(Spring 4 websockets with Stomp and Sockjs) are efficient for creating a multiplayer games?<br />Thanks for this. :DAnonymoushttps://www.blogger.com/profile/16618694743037099247noreply@blogger.comtag:blogger.com,1999:blog-523151633387570637.post-60031027623663599062014-02-26T14:20:34.221-08:002014-02-26T14:20:34.221-08:00Thanks Nikhil. Refer to the Spring Stock Portfolio...Thanks Nikhil. Refer to the <a href="https://github.com/rstoyanchev/spring-websocket-portfolio" rel="nofollow">Spring Stock Portfolio example</a>. It has what you are are looking for - 'sending message to a specific user'.Sunithttps://www.blogger.com/profile/17473475495055036179noreply@blogger.comtag:blogger.com,1999:blog-523151633387570637.post-32301850665638132032014-02-26T13:09:02.600-08:002014-02-26T13:09:02.600-08:00great post...really helped.
waiting for the releas...great post...really helped.<br />waiting for the release to send message to a particular user.NIKHIL SAGARhttps://www.blogger.com/profile/07214582913994493415noreply@blogger.com