securing ASP.NET forms authentication token on client side?

*爱你&永不变心* 提交于 2019-12-04 14:44:42

Session:
Fast, Scalable, and Secure Session State Management for Your Web Applications

Authentication:
How To: Protect Forms Authentication in ASP.NET 2.0

 Step 1. Configure

Ensure that your forms authentication tickets are encrypted and integrity checked by setting protection="All" on the element. This is the default setting and you can view this in the Machine.config.comments file.

<forms protection="All" ... />

 Step 2. Use SHA1 for HMAC Generation and AES for Encryption

<machineKey 
   validationKey="AutoGenerate,IsolateApps"
   decryptionKey="AutoGenerate,IsolateApps"
   decryption="Auto" 
   validation="SHA1" />

 Step 3. Protect Authentication Tickets with SSL

<forms loginUrl="Secure\Login.aspx"
       requireSSL="true" ... />
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!