語言

MicrosoftIdentityConsentAndConditionalAccessHandler 類別

定義

針對 Blazor 專用 API 的處理器,用於處理增量同意與條件存取。

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

建構函式

名稱 Description
MicrosoftIdentityConsentAndConditionalAccessHandler(IServiceProvider)

初始化 MicrosoftIdentityConsentAndConditionalAccessHandler 類別的新執行個體。

屬性

名稱 Description
BaseUri

用來建立重定向的基礎 URI。

IsBlazorServer

布林值來判斷伺服器是否是 Blazor。

User

目前的使用者。

方法

名稱 Description
ChallengeUser(String[], String, String)

強制使用者同意特定範圍並執行條件存取以取得特定權利要求。 在 Razor/Blazor 頁面或控制器上使用,主動確認範圍和/或權利要求,然後再取得代幣。 另一種機制HandleException(Exception)則確保 Azure AD 在憑證取得失敗後所請求的聲明與範圍。 如需詳細資訊,請參閱 https://aka.ms/ms-id-web/ca_incremental-consent。

HandleException(Exception)

讓 Blazor/Razor 頁面處理使用者挑戰的例外。

適用於