【问题标题】:verifyJWT not working in Ethr-did nodejs?verifyJWT 在 Ethr-did nodejs 中不起作用?
【发布时间】:2019-12-31 19:36:49
【问题描述】:

我正在尝试使用ethr-did library. 生成和注册 DID

我创建了一个

 const ethrDid = new EthrDID({provider, address, registry})

然后通过

对有效载荷进行签名
const helloJWT = await ethrDid.signJWT({hello: 'world'})

但是当我这样做是通过 jwt 验证时

const {payload, issuer} = ethrDid.verifyJWT(jwt)

它给出了一个错误

(node:3310) UnhandledPromiseRejectionWarning: Error: Unsupported DID method: 'ethr'

我搜索了整个互联网,但没有找到任何东西。

【问题讨论】:

    标签: jwt claims-based-identity


    【解决方案1】:

    需要像这样先注册解析器

    registerResolver({provider : provider,registry:registry})

    【讨论】:

      猜你喜欢
      • 2011-11-17
      • 1970-01-01
      • 2016-07-30
      • 2023-03-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多