Rod*_*ner 8 azure azure-functions
我刚刚将我的函数应用程序配置为使用 azure Active Directory。之后,我想通过更改 HttpTrigger 属性的枚举来停用功能级身份验证。然后我发现可以切换到“用户”授权级别,其描述为:
允许访问包含有效身份验证令牌的请求
部署函数后,我只收到 401 个未经授权的请求,因此我切换回匿名授权级别。
public enum AuthorizationLevel
{
//
// Summary:
// Allow access to anonymous requests.
Anonymous = 0,
//
// Summary:
// Allow access to requests that include a valid authentication token
User = 1,
//
// Summary:
// Allow access to requests that include a function key
Function = 2,
//
// Summary:
// Allows access to requests that include a system key
System = 3,
//
// Summary:
// Allow access to requests that include the master key
Admin = 4
}
Run Code Online (Sandbox Code Playgroud)
所以我的问题是,如何正确使用“用户”授权级别?我可以在启用 Azure Active Directory 的情况下使用它吗?
| 归档时间: |
|
| 查看次数: |
7275 次 |
| 最近记录: |