简体   繁体   中英

HTML5 mobile app security

I'm developing a html5+jquery+phonegap application. Server side is written in java and Spring MVC.And I hope to implement an authentication model as follows.

  1. client signs up using his email which would be used as his userID.
  2. A token is sent to his email.
  3. He is given a screen to enter the token.
  4. That token is stored in the local storage of the client.
  5. everytime the client calls a webservice, his userID and token is sent by the app over https.
  6. Server authenticates him and responds.

What are the options available to implment this kind of security from the server side? can Spring-security be used in this way? I tried to find any implmentation with Spring-security, but couldn't find any implmentation other than basic authentication.

您可以使用PreAuthenticationProcessingFilter来满足此要求,并具有类似的案例和spring安全文档

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