how to generate a unique token which expires after 24 hours?

前端 未结 5 443
既然无缘
既然无缘 2020-11-28 17:30

I have a WCF Webservice which checks if the user is valid.

If the user is valid I want to generate a token which expires after 24 hours.

public bool         


        
5条回答
  •  无人及你
    2020-11-28 18:13

    you need to store the token while creating for 1st registration. When you retrieve data from login table you need to differentiate entered date with current date if it is more than 1 day (24 hours) you need to display message like your token is expired.

    To generate key refer here

提交回复
热议问题