Coder Social home page Coder Social logo

jwt签名内容包含了用户的密码,签名只可验证不能保密,会泄漏密码,只包含用户id就好了吧 about go-gin-example HOT 2 OPEN

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

from go-gin-example.

Comments (2)

1-bytes avatar 1-bytes commented on June 11, 2024

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

from go-gin-example.

whzywxt avatar whzywxt commented on June 11, 2024

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

from go-gin-example.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.