如何将 apitoken 添加为自定义 VSTS 服务端点数据源的一部分?
How do add an apitoken as part of a custom VSTS service endpoint datasource?
我正在尝试实现一个添加新服务端点的 VSTS 扩展。至关重要的是,此服务的身份验证方法包括 API 作为查询字符串的一部分。
我正在为 AuthenticationScheme
使用 "type": "ms.vss-endpoint.endpoint-auth-scheme-token"
。
我已经这样定义了 dataSources
:
"dataSources": [
{
"name": "TestConnection",
"endpointUrl": "{{endpoint.url}}projects?token={{endpoint.apitoken}}"
}
]
但是,在对 Verify Connection
进行测试时:
Failed to query service endpoint api: https://myserver.com/projects?token=.
endpoint.apitoken
总是空白。
是否有 placeholder/replacement 值可用于访问此值或实现相同最终结果的其他方式?
我试过使用不同的身份验证方案(例如“none
”)并包含一个 inputDescriptor
来捕获我的 apitoken
,但我得到了相同的结果。似乎没有办法引用这些值?
不,不支持。本文可能对您有所帮助:Service endpoint authentication schemes
我正在尝试实现一个添加新服务端点的 VSTS 扩展。至关重要的是,此服务的身份验证方法包括 API 作为查询字符串的一部分。
我正在为 AuthenticationScheme
使用 "type": "ms.vss-endpoint.endpoint-auth-scheme-token"
。
我已经这样定义了 dataSources
:
"dataSources": [
{
"name": "TestConnection",
"endpointUrl": "{{endpoint.url}}projects?token={{endpoint.apitoken}}"
}
]
但是,在对 Verify Connection
进行测试时:
Failed to query service endpoint api: https://myserver.com/projects?token=.
endpoint.apitoken
总是空白。
是否有 placeholder/replacement 值可用于访问此值或实现相同最终结果的其他方式?
我试过使用不同的身份验证方案(例如“none
”)并包含一个 inputDescriptor
来捕获我的 apitoken
,但我得到了相同的结果。似乎没有办法引用这些值?
不,不支持。本文可能对您有所帮助:Service endpoint authentication schemes