eddycjy / go-gin-example

An example of gin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jwt签名内容包含了用户的密码,签名只可验证不能保密,会泄漏密码,只包含用户id就好了吧

wangyongfeng5 opened this issue · comments

commented
commented

是的,看到将用户名和密码的信息摘要写了进去,后来我用的时候又改写的
其实只存储 uid 和 username 就可以了,完全没必要再将密码的哈希存储区进去

我自己简单改了下,只存username,去掉password,有效期改为配置项了。