简体   繁体   中英

Best approach for securing REST services and a web application

I´m building a web application which comunicates server and clients through REST services (I´m planning to build a mobile app in mid term).

I´ve used Spring Security in other web applications without REST services. But I´m not sure if that approach is suitable for my scenario.

Is it possible secure both access to web pages and calls to REST services using Spring Security? What would you recommend?

Backend uses Spring Data + Spring MVC.

Thank you.

Yes, Spring Security is a good way to secure both REST endpoints and traditional MVC webpages. The implementation can be similar for both your REST endpoints and MVC routes depending on your requirements.

Spring Security is a popular and effective way to add security to your Spring application. Since you already have experience with it, you should be able to secure your REST endpoints with relative ease.

Check out this detailed tutorial on securing REST routes with Spring Security to get started: https://spring.io/guides/tutorials/rest/5/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM