Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why to keep login contolller as Spring REST service?

 
Monica Shiralkar
Ranch Hand
Posts: 825
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have seen applications of spring where along with other functionalites. even login authentication is also kept as spring service.but what i didn't understand is that why to keep it as rest service.I mean what is the advantage which we get by keeping login as rest service?what would the GET request xml of login webservice show?
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you will need to link the application you are looking at if its a tutorial. I don't quite understand the question. Typically you would use the Spring Security project for this kind of thing.

http://www.springsource.org/spring-security
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My app is using REST for login because my app is. Single page app and if I wasn't a REST API it would be at least a two page app and require jsp pages. I don't want either in my app.
 
Monica Shiralkar
Ranch Hand
Posts: 825
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks.
ok.so what info would the GET method of this app or yours display as xml.?there lies my confusion
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Monica. Shiralkar wrote:thanks.
ok.so what info would the GET method of this app or yours display as xml.?there lies my confusion


Which GET? The login? I don't have any GET for login, just POST for when the user enters their credentials. And for that I use Spring Security. For REST login, I do have to do some things manually in Spring Security, but that is like 4-5 lines of code. But to get a single page app, I am willing to write those few lines.

Mark
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OH, and I have no XML. I have json data being passed back and forth in my app through my AJAX calls.

Mark
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic