語言

DownstreamWebApiOptions 類別

定義

透過傳入選項來呼叫下游的網頁 API。 若要呼叫 Microsoft Graph,請參考MicrosoftGraphOptions組合語言。Microsoft.Identity.Web.MicrosoftGraph

public class DownstreamWebApiOptions : Microsoft.Identity.Web.MicrosoftIdentityAuthenticationBaseOptions, ICloneable
type DownstreamWebApiOptions = class
    inherit MicrosoftIdentityAuthenticationBaseOptions
    interface ICloneable
Public Class DownstreamWebApiOptions
Inherits MicrosoftIdentityAuthenticationBaseOptions
Implements ICloneable
繼承
實作

建構函式

名稱 Description
DownstreamWebApiOptions()

透過傳入選項來呼叫下游的網頁 API。 若要呼叫 Microsoft Graph,請參考MicrosoftGraphOptions組合語言。Microsoft.Identity.Web.MicrosoftGraph

屬性

名稱 Description
AuthenticationScheme

認證方案。 若為空,則使用 OpenIdConnectDefault.AuthenticationScheme(從網頁應用程式呼叫),若從網頁 API 呼叫則使用 JwtBearerDefault.AuthenticationScheme。

(繼承來源 MicrosoftIdentityAuthenticationBaseOptions)
BaseUrl

呼叫下游 Web API 的基礎網址。 例如 "https://graph.microsoft.com/beta/".。

CustomizeHttpRequestMessage

提供自訂 HttpRequestMessage 的機會。 例如,要自訂標頭。 此呼叫會在訊息形成後(包括授權標頭)及訊息發送前執行。

HttpMethod

HTTP 方法用於呼叫這個下游的 Web API(預設為 Get)。

IsProofOfPossessionRequest

修改代幣取得請求,使所取得代幣成為持有證明代幣(PoP),而非持有人代幣。 PoP 標記與持有憑證類似,但綁定於 HTTP 請求及加密金鑰,MSAL 可管理此金鑰。 參見 https://aka.ms/msal-net-pop。 設為 true,可以自動啟用 PoP 標記。

(繼承來源 MicrosoftIdentityAuthenticationBaseOptions)
RelativePath

相對於 BaseUrl 路徑(例如「我」)。

Scopes

呼叫下游網頁 API 所需的空間分隔範圍。 例如「user.read mail.read」。

(繼承來源 MicrosoftIdentityAuthenticationBaseOptions)
Tenant

[可選] 租戶識別碼。 此方法用於特定情境,應用程式需代表多個租戶中的使用者呼叫下游網頁 API。 它大多會從程式碼中使用,而非從設定中取得。

(繼承來源 MicrosoftIdentityAuthenticationBaseOptions)
TokenAcquisitionOptions

選項傳遞來建立標記擷取物件,該物件呼叫至 MSAL .NET。

(繼承來源 MicrosoftIdentityAuthenticationBaseOptions)
UserFlow

[可選]。 使用者流程(以 B2C 下游網頁 API 為例)。 若未指定,B2C 下游網頁 API 將以預設的使用者流程呼叫。DefaultUserFlow

(繼承來源 MicrosoftIdentityAuthenticationBaseOptions)

方法

名稱 Description
Clone()

複製選項(以便能覆蓋它們)。

GetApiUrl()

回傳下游的網頁 API URL。

GetScopes()

還望遠鏡。

(繼承來源 MicrosoftIdentityAuthenticationBaseOptions)

明確介面實作

名稱 Description
ICloneable.Clone()

複製選項(以便能覆蓋它們)。

適用於