lijiale2012
V2EX  ›  Node.js

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

  •  
  •   lijiale2012 · Jun 9, 2021 · 3062 views
    This topic created in 1978 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
    wotemelon
    Jun 10, 2021
    1
    koa-jwt 只是在 jsonwebtoken 基础封装了一层适合 koa 的中间件,比如 header 校验等
    你也可以直接用 jsonwebtoken
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4002 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 06:02 · PVG 14:02 · LAX 22:02 · JFK 01:02
    ♥ Do have faith in what you're doing.