• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Eugen Paraschiv: REST course

 
Ranch Hand
Posts: 46
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Eugen,

I have always been wondering about Spring's support for RESTful architectures. It certainly does support making a REST interface with Spring MVC, but once you start using other features like Spring Security, the way it handles user authentication and CSRF token generation, it seems to me that Spring is tightly bound with the stateful Servlet implementation. Would you recommend avoiding Spring Security when building a RESTful interface, or rather try to persist session information with Spring Session? Or is there an easy way with REST to handle authentication and csrf without relying on servlet's sessions?
 
Rest with Spring Software Support
Posts: 35
5
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's definitely an interesting question. And your notes are were definitely true a few years back, but Spring is always moving forward. Now, I'd say that Spring Security plays well with the RESTful approach in all but one scenarios - and that is a fully custom token based security mechanism (similar to what AWS uses). But if you need a fully-stateless mechanism, there's good support for OAuth 2 + JWT. And of course a lot of other options.
Hope that helps. Cheers,
Eugen.
reply
    Bookmark Topic Watch Topic
  • New Topic