lijiale2012
V2EX  ›  Node.js

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

  •  
  •   lijiale2012 · Jun 9, 2021 · 2831 views
    This topic created in 1886 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   ·   850 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 20:47 · PVG 04:47 · LAX 13:47 · JFK 16:47
    ♥ Do have faith in what you're doing.