首页 文章

如何将apitoken添加为自定义VSTS服务 endpoints 数据源的一部分?

提问于
浏览
2

我正在尝试实现一个添加新服务 endpoints 的VSTS扩展 . 至关重要的是,此服务的身份验证方法包括API作为查询字符串的一部分 .

我正在使用 "type": "ms.vss-endpoint.endpoint-auth-scheme-token" for AuthenticationScheme .

我已经像这样定义了 dataSources

"dataSources": [
    {
        "name": "TestConnection",
        "endpointUrl": "{{endpoint.url}}projects?token={{endpoint.apitoken}}"
    }
]

但是,在执行 Verify Connection 的测试时:

无法查询服务 endpoints api:https://myserver.com/projects?title = .

endpoint.apitoken 始终为空白 .

是否有占位符/替换值可用于访问此值或实现相同最终结果的其他方式?

我've tried using different authentication schemes (such as ' none ')并包含一个 inputDescriptor 来捕获我的 apitoken ,但我有相同的结果 . 似乎没有办法引用这些值?

1 回答

相关问题