GCP端点“尝试使用此API"授权网址 [英] GCP Endpoint "Try this API" authorization URL

查看:87
本文介绍了GCP端点“尝试使用此API"授权网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用服务帐户作为身份验证在GCP端点中配置尝试此API"功能.我正在使用以下文档: https://cloud.google.com/端点/docs/openapi/authenticating-users-custom
我已经配置了端点安全性定义,如下所述.

I am trying to configure the "Try this API" feature in GCP Endpoint using a service account as authentication. I am using this documentation: https://cloud.google.com/endpoints/docs/openapi/authenticating-users-custom
I have configured endpoint securityDefinitions as stated below.

securityDefinitions:  
  google_service_account_dev:  
    authorizationUrl: ""  
    flow: "implicit"  
    type: "oauth2"  
    x-google-issuer: "[...]@appspot.gserviceaccount.com"  
    x-google-jwks_uri: "https://www.googleapis.com/robot/v1/metadata/x509/[...]@appspot.gserviceaccount.com"  
    x-google-audiences: "[...].appspot.com"

在开发人员门户中有一条消息:
"Try this API" is disabled for users on this page for the following reasons: "Try this API" requires an authorization URL to be specified in the API spec for the "google_service_account_dev" security requirement.

In the developer portal there is a message:
"Try this API" is disabled for users on this page for the following reasons: "Try this API" requires an authorization URL to be specified in the API spec for the "google_service_account_dev" security requirement.

在文档中,"authorizationUrl"组件为空,因此文档存在错误.
应该如何配置它以允许使用尝试此API"功能?

In documentation "authorizationUrl" component is empty, so documentation is buggy.
How it should be configured to allow to use "Try this API" feature?


我尝试遵循此文档: https://cloud.google .com/endpoints/docs/openapi/dev-portal-explore-api
好像已经过时了.根据门户设置中的文档,应该有APIs Explorer Settings部分,但该部分不存在.知道我应该在哪里粘贴API密钥吗?


I tried to follow this documentation: https://cloud.google.com/endpoints/docs/openapi/dev-portal-explore-api
It seems out of date. According to the document in the Portal settings there should be APIs Explorer Settings section, but it is not present. Any idea where I should paste the API Key?

推荐答案

我也花了很多时间来制作尝试使用此API" GCP API端点门户(不公开)上提供的功能.经过几个月的努力,昨天,我在

I've spend a lot of time too to make the "Try this API" feature available on our GCP API Endpoints Portal (not public). And after a couple of month to struggling with that, yesterday I found my answer on the GCP API management doc limitations. And as it's well specified :

必须可以 公开访问Endpoints服务,才能使用 试试这个API面板.如果其他身份验证(例如 (如IAP)在Endpoints服务上进行配置.

The Endpoints service must be publicly accessible in order to use the Try this API panel. Requests will fail if other authentication (such as IAP) is configured on the Endpoints service.

所以..我已将其停用,因为必须对我们的API进行身份验证. :/对不起,这个坏消息,但我希望至少这不会浪费您的时间.

So.. I've deactivate it cause our API must be authenticated. :/ Sorry for this bad news, but I hope at least that will not waste your time with that.

这篇关于GCP端点“尝试使用此API"授权网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆