6

【踩坑】Go使用JWT生成Token时报错

 1 year ago
source link: https://blog.loli.fj.cn/2023/05/10/Go%E4%BD%BF%E7%94%A8JWT%E7%94%9F%E6%88%90Token%E6%97%B6%E6%8A%A5%E9%94%99/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

【踩坑】Go使用JWT生成Token时报错

2023-05-10

Go使用JWT生成Token时报错:key is of invalid type

  • token.SignedString()需要传递byte[]而不是string
  • 传递字节数组作为SignedString

稀土掘金——水纹


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK