繁体   English   中英

WSO2 APIM 1.10-通过REST-API添加api时配置端点安全方案

[英]WSO2 APIM 1.10 - config endpoint secure scheme while adding api via REST-API

我正在使用API​​M 1.10通过REST-API添加新API(请参阅: https ://docs.wso2.com/display/AM1100/apidocs/publisher/#!/operations#APIsApi#apisPost),它工作正常,但:

我想为api端点添加安全方案:“基本身份验证”。 但我不知道如何执行此操作,因为未描述endpointConfig-config。

我需要这样的东西:endpointSecured:true,endpointAuthDigest:“基本”,endpointUTUsername:“ usN”,endpointUTPassword:“ pass”

有任何想法吗?

以下步骤将帮助您达到要求。

  • 编辑API并转到“实现”标签。
  • 点击“显示更多选项”。
  • 为端点安全方案选择“安全”。
  • 提供凭据并保存。

使用rest API创建API时,可以通过添加以下部分来添加安全的端点详细信息。
&endpointType = secured&epUsername =“ admin”&epPassword =“ admin”

这是一个示例命令

curl -X POST -b cookies http://localhost:9763/publisher/site/blocks/item-add/ajax/add.jag -d "action=addAPI&name=SampleAPI&context=/country&version=1.0.0&visibility=public&thumbUrl=&description=Check Country by Code&tags=country&endpointType=secured&epUsername="admin"& epPassword="admin"&tiersCollection=Gold,Bronze&http_checked=http&https_checked=https&resourceCount=0&resourceMethod-0=GET&resourceMethodAuthType-0=Application&resourceMethodThrottlingTier-0=Unlimited&uriTemplate-0=/*&default_version_checked=default_version&bizOwner=xx&bizOwnerMail=xx@ee.com&techOwner=xx&techOwnerMail=ggg@ww.com" -d'endpoint_config={"production_endpoints":{"url":"http://services.groupkt.com/country/get/iso2code/IN","config":null},"endpoint_type":"http"}'; 

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM