52

vue项目中使用token的身份验证的简单实践

 5 years ago
source link: https://juejin.im/post/5c788f8a6fb9a04a0379e9ae
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
工作原理 前端页面进行登录操作, 将用户名与密码发给服务器; 服务器进行效验, 通过后生成token, 包含信息有密钥, uid, 过期时间, 一些随机算法等 ,然后返回给前端 前端将token保存在本地中, 建议使用localstorage进行保存. 下

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK