gpt4 book ai didi

azure 功能身份验证

转载 作者:行者123 更新时间:2023-12-04 18:56:32 25 4
gpt4 key购买 nike

我正在编写一个 http 触发器 azure 函数,它验证 Json 并将其存储在数据库中。多个客户端(其他服务器)调用此函数。Azure 函数应用程序提供不同的授权级别(函数、管理员),这些级别会发出一个可供所有客户端使用的密码,并保护函数应用程序的安全。我想知道我们是否可以为不同的客户端颁发不同的密码或实现 Oauth 或类似的授权协议(protocol)以提高安全性。

最佳答案

这里提供一个认证方式供您引用,您可以尝试配置Authentication / Authorization在函数应用的平台功能中。

您可以按照以下步骤操作。

  1. 首先,转到 Httptrigger 的集成,设置 Authorization levelAnonymous .

enter image description here

2.访问Authentication / Authorization ,在这个场景中,例如我将其配置为 Log in with Azure Active Directory并保存配置,引用截图。

enter image description here

3.然后转到门户中的Azure Active Directory,您可以找到您的应用注册。

enter image description here

4.配置 homepage在带有 Httptrigger URL list 中(您可以通过 Httptrigger 中的 </> Get function URL 获取它),保存 list 。

enter image description here

5.尝试使用类似 https://yourfunction.azurewebsites.net/api/yourhttptrigger?xxxxx 的 url 登录 HttpTrigger在浏览器中,它会重定向到AAD登录页面,使用AAD帐户登录,然后可以看到您的HttpTrigger。

enter image description here

enter image description here

更多详情请引用此article .

关于 azure 功能身份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51413576/

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