shuimu98
V2EX  ›  服务器

咨询一个 jwt 的问题

  •  
  •   shuimu98 · Sep 15, 2015 · 2752 views
    This topic created in 3922 days ago, the information mentioned may be changed or developed.

    刚刚转到 app 后端开发,认证用 json web token 来做,但是我看了下网上很多的例子,都是说把 token 放在 http header 里面的 Authorzition 字段里面,但是我通过抓包软件,就能抓到这个 token ,那这样不就暴露了 token ,别人不就可以重放攻击了?

    本人不才,刚刚接触 jwt ,望请教。

    eric
        1
    eric  
       Sep 15, 2015   ❤️ 1
    JWT 只是通过签名来确保令牌无法被伪造,当然你可以通过限制有效期和 IP 地址绑定等等手段提高重放攻击的难度,但最有效的解决方法是 TLS 。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5354 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 45ms · UTC 08:48 · PVG 16:48 · LAX 01:48 · JFK 04:48
    ♥ Do have faith in what you're doing.