• 请不要在回答技术问题时复制粘贴 AI 生成的内容
Solace202
V2EX  ›  程序员

小白求教关于 JWT 的在集群时的验证问题

  •  
  •   Solace202 · May 13, 2019 · 2311 views
    This topic created in 2652 days ago, the information mentioned may be changed or developed.
    工作时间不长,让做一个小项目,请求验证使用了 JWT。刚本问到个问题,当部署成集群时,使用 JWT 会不会有什么问题?
    5 replies    2019-05-13 10:53:27 +08:00
    ourslay
        1
    ourslay  
       May 13, 2019 via Android
    密钥一样就行
    Solace202
        2
    Solace202  
    OP
       May 13, 2019
    @ourslay 那就是不会存在类似 session 验证的问题对吧,那服务器重启会不会影响用户的登录状态呢?我觉得不会吧,秘钥不变,expire 不过期那应该还是会保持登录状态的对吧
    gz911122
        3
    gz911122  
       May 13, 2019
    @Solace202 不会 不影响
    Immortal
        4
    Immortal  
       May 13, 2019
    只是个加解密的过程 密钥加解密算法一致就行了
    Solace202
        5
    Solace202  
    OP
       May 13, 2019
    @Immortal @ourslay @ourslay 多谢各位,那就懂了。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   988 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 18:47 · PVG 02:47 · LAX 11:47 · JFK 14:47
    ♥ Do have faith in what you're doing.