App Engine API 和密钥
App Engine API and Secret Key
我需要为 Google App Engine 上的 Web 服务设置 API 密钥和 API 机密。我的目标是让第三方应用程序提供这两个密钥来访问 Web 服务。第三方应用可以写成PHP或Java等。我的 App Engine 应用程序是用 Java.
编写的
- 到目前为止我做了什么:
我遵循了本教程 https://cloud.google.com/eclipse/docs/creating-new-webapp 现在我
可以通过以下方式使用网络浏览器访问该应用程序
https://my-ip-address/hello。我在网上搜索并尝试了不同的东西,比如 Google 控制台中的 "Credentials" 选项卡,但我仍然可以在 /hello 上访问它而无需提供任何 API 键。
- 我需要什么:
我需要生成 API 密钥和 API 我可以提供给最终用户应用程序的秘密能够访问我的 API.
在 Stack Overflow 上未发现类似问题。我可能做错了。期待收到您的来信。
在 Google Cloud Endpoints documentation there is a Choosing an Authentication Method section. Also look at Why and When to Use API Keys 中,他们解释说:
API keys are for projects, authentication is for users
Google Cloud Endpoints handles both API keys and authentication
schemes (such as Firebase or Auth0). The main distinction between
these two is:
API keys identify the calling project — the app or site — making the call to an API
Auth tokens identify a user — the person — that is using the app or site .....
通常有很多文档解释身份验证方法之间的差异以及如何使用它们(见下图)。
如果您确定自己需要什么,Restricting API Access with API Keys 是正确的选择。
我需要为 Google App Engine 上的 Web 服务设置 API 密钥和 API 机密。我的目标是让第三方应用程序提供这两个密钥来访问 Web 服务。第三方应用可以写成PHP或Java等。我的 App Engine 应用程序是用 Java.
- 到目前为止我做了什么:
我遵循了本教程 https://cloud.google.com/eclipse/docs/creating-new-webapp 现在我 可以通过以下方式使用网络浏览器访问该应用程序 https://my-ip-address/hello。我在网上搜索并尝试了不同的东西,比如 Google 控制台中的 "Credentials" 选项卡,但我仍然可以在 /hello 上访问它而无需提供任何 API 键。 - 我需要什么:
我需要生成 API 密钥和 API 我可以提供给最终用户应用程序的秘密能够访问我的 API.
在 Stack Overflow 上未发现类似问题。我可能做错了。期待收到您的来信。
在 Google Cloud Endpoints documentation there is a Choosing an Authentication Method section. Also look at Why and When to Use API Keys 中,他们解释说:
API keys are for projects, authentication is for users
Google Cloud Endpoints handles both API keys and authentication schemes (such as Firebase or Auth0). The main distinction between these two is:
API keys identify the calling project — the app or site — making the call to an API
Auth tokens identify a user — the person — that is using the app or site .....
通常有很多文档解释身份验证方法之间的差异以及如何使用它们(见下图)。
如果您确定自己需要什么,Restricting API Access with API Keys 是正确的选择。