gpt4 book ai didi

javascript - 如何验证请求是否来自特定的 Web 应用程序

转载 作者:搜寻专家 更新时间:2023-10-31 21:08:37 24 4
gpt4 key购买 nike

所以我有一个用于我的 (javascript) 网络应用程序的网络 API。该应用程序封装在 Cordova 中,并在 iOS 和 Android 上分发。

我希望限制数据访问(防止第三方使用我的 API)。但是我该怎么做呢?我不要求(也不希望)用户创建帐户,因此应用程序本身必须以某种方式验证发送请求的是应用程序,而不是其他人。

但是如何呢?

最佳答案

I would prefer to keep the data access limited (keep third parties from using my API). But how would I do this?

...

the app itself must somehow verify that its the app sending the request, and not someone else.

...

But how?

您所要求的是不可能的。这也是要解决的错误问题。

进一步阅读:Client Authenticity is not the Server's Problem

关于javascript - 如何验证请求是否来自特定的 Web 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27315791/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com