语言

MicrosoftIdentityConsentAndConditionalAccessHandler 类

定义

Blazor 特定 API 的处理程序,用于处理增量许可和条件访问。

public class MicrosoftIdentityConsentAndConditionalAccessHandler
type MicrosoftIdentityConsentAndConditionalAccessHandler = class
Public Class MicrosoftIdentityConsentAndConditionalAccessHandler
继承
MicrosoftIdentityConsentAndConditionalAccessHandler

构造函数

名称 说明
MicrosoftIdentityConsentAndConditionalAccessHandler(IServiceProvider)

初始化 MicrosoftIdentityConsentAndConditionalAccessHandler 类的新实例。

属性

名称 说明
BaseUri

用于形成重定向的基 URI。

IsBlazorServer

用于确定服务器是否为 Blazor 的布尔值。

User

当前用户。

方法

名称 说明
ChallengeUser(String[], String, String)

强制用户同意特定范围并执行条件访问以获取特定声明。 在 Razor/Blazor 页或控制器上使用,在获取令牌之前主动确保范围和/或声明。 另一种机制HandleException(Exception)可确保Azure AD 在令牌获取尝试失败后请求的声明和范围。 有关详细信息,请参阅https://aka.ms/ms-id-web/ca_incremental-consent。

HandleException(Exception)

对于 Blazor/Razor 页面,处理用户质询的异常。

适用于