代码之家  ›  专栏  ›  技术社区  ›  ChadT

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

  •  2
  • ChadT  · 技术社区  · 8 年前

    我正在尝试实现一个vsts扩展,它添加了一个新的服务端点。关键的是,此服务的身份验证方法包括api作为querystring的一部分。

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

    我已经定义了 dataSources 像这样:

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

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

    查询服务终结点API失败: https://myserver.com/projects?token= .

    endpoint.apitoken 总是空白的。

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

    我尝试过使用不同的身份验证方案(例如 none )并包括 inputDescriptor 抓住我的 apitoken ,但我有同样的结果。似乎没有办法引用这些值?

    1 回复  |  直到 8 年前
        1
  •  0
  •   starian chen-MSFT    8 年前

    不,不支持。这篇文章可能对您有益: Service endpoint authentication schemes

    推荐文章