如何在没有用户和登录的情况下使用 JWT? [英] How to use JWT without user and login?
本文介绍了如何在没有用户和登录的情况下使用 JWT?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在 Node.js 中制作一个简单的文件转换器 API,我希望避免请求中的滥用.因此,我正在寻找一种无需 userModel、登录等即可使用 JWT 的方法.
I'm making a simple file converter API in Node.js and I'm looking to avoid abuse in requests. So I'm looking for a way to use JWT without userModel, login etc.
但我不能上网.
谢谢
推荐答案
我们不需要用户或登录来创建 JWT,我们可以使用任何类型的数据生成令牌.简单只需生成一个令牌,然后在文件转换请求验证令牌后将其传递给客户端.
we don't need a user or login to create JWT, we can generate a token with any kind of data. Simple just generate a token then pass it to the client after that on file convert request verify the token.
我找到了可能对您有所帮助的类似主题点击这里
I found similar topic that might help you click here
这篇关于如何在没有用户和登录的情况下使用 JWT?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文