aspose file tools*
The moose likes Spring and the fly likes why to keep login contolller as Spring REST service? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "why to keep login contolller as Spring REST service?" Watch "why to keep login contolller as Spring REST service?" New topic
Author

why to keep login contolller as Spring REST service?

Monica. Shiralkar
Ranch Hand

Joined: Jul 07, 2012
Posts: 639
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

Joined: Mar 07, 2010
Posts: 1648
    
    7

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


[How To Ask Questions][Read before you PM me]
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

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.


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Monica. Shiralkar
Ranch Hand

Joined: Jul 07, 2012
Posts: 639
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

Joined: Feb 05, 2001
Posts: 17250
    
    6

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

Joined: Feb 05, 2001
Posts: 17250
    
    6

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
 
subject: why to keep login contolller as Spring REST service?