简体   繁体   中英

How to handle security on spring mvc back end with webapp and android app?

We have to design a simple web application. We have a simple user model class with a username, password and email. Now we want to add some SIMPLE security to this login. I have read a few things about cookies, tokens and servletfilters, but I have no idea what to do concretely.

Basically what we want is: -> Somehow keep track of a logged in user through our application.

It is written in java with spring-hibernate, the user is stored in a mysql database. When a user logs in we check if the user that has been retrieved matches the password that has been typed in.

So if someone could point us to a simple tutorial where we can implement a simple thing liek this, it'd be greatly aprpeciated.

Instead of implementing something on your own, try using an existing and proven solution like spring security, adding a simple user login form and remember me functionality is a matter of configuration in your context XML, Try this tutorial .

If you need an alternative then you could also use Apache Shiro .

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