gpt4 book ai didi

azure - 如何在 Azure 中对 OAuth 2.0 protected API 进行可用性测试

转载 作者:行者123 更新时间:2023-12-02 07:25:06 38 4
gpt4 key购买 nike

我正在 Application Insights 中为 Azure API 创建可用性测试,但由于未经授权的访问,这些测试失败。它说 JVT 验证失败,因为 token 不存在。

当我从开发人员门户测试相同内容并生成 token 时。那里工作得很好。但我无法从门户网站获得相同的信息。

我提到了这个东西:https://learn.microsoft.com/en-gb/azure/azure-monitor/app/monitor-web-app-availability

最佳答案

我认为您在从门户可用性测试调用时不可能从 token 端点获取不记名 token 。一种替代方法是编写计时器触发的 Azure 函数并将结果记录到 AppInsights,然后根据阈值发出警报。在Azure函数中,您可以调用 token 端点,获取 token ,然后通过传递 token 来调用API端点。

引用链接 - https://learn.microsoft.com/en-gb/azure/azure-monitor/app/availability-azure-functions

关于azure - 如何在 Azure 中对 OAuth 2.0 protected API 进行可用性测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56733801/

38 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com