V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
lijiale2012
V2EX  ›  Node.js

用 koa-jwt 比用 jsonwebtoken 到底有什么优点?

  •  
  •   lijiale2012 · Jun 9, 2021 · 2642 views
    This topic created in 1793 days ago, the information mentioned may be changed or developed.
    jsonwebtoken 可以 sign 一个 token,也可以 verify 一个 token,那 koa-jwt 这种存在的意义是什么?
    1 replies    2021-06-10 10:27:54 +08:00
    wotemelon
        1
    wotemelon  
       Jun 10, 2021
    koa-jwt 只是在 jsonwebtoken 基础封装了一层适合 koa 的中间件,比如 header 校验等
    你也可以直接用 jsonwebtoken
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1301 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 17:15 · PVG 01:15 · LAX 10:15 · JFK 13:15
    ♥ Do have faith in what you're doing.