OnBehalfOfClient class

在Behalf-Of 客戶端

Extends
@azure/msal-common.BaseClient

繼承的屬性

authority
logger

方法

acquireToken(CommonOnBehalfOfRequest)

公開 API 用於代表 Flow 取得代幣

繼承的方法

createTokenQueryParameters(BaseAuthRequest)

為 /token 請求建立查詢字串

sendPostRequest<T>(RequestThumbprint, string, NetworkRequestOptions, string)

封裝 sendPostRequestAsync 並包含必要的檢查前檢查與飛行後邏輯

updateAuthority(string, string)

更新用戶端的權威物件。 端點發現必須完成。

建構函式詳細資料

OnBehalfOfClient(ClientConfiguration)

new OnBehalfOfClient(configuration: ClientConfiguration)

參數

configuration
@azure/msal-common.ClientConfiguration

繼承的屬性詳細資料

authority

authority: Authority

屬性值

@azure/msal-common.Authority

繼承自 BaseClient.authority

logger

logger: Logger

屬性值

繼承自 BaseClient.logger

方法詳細資料

acquireToken(CommonOnBehalfOfRequest)

公開 API 用於代表 Flow 取得代幣

function acquireToken(request: CommonOnBehalfOfRequest): Promise<null | AuthenticationResult>

參數

request
CommonOnBehalfOfRequest

開發者提供 CommonOnBehalfOfRequest

傳回

Promise<null | AuthenticationResult>

繼承的方法的詳細資料

createTokenQueryParameters(BaseAuthRequest)

為 /token 請求建立查詢字串

function createTokenQueryParameters(request: BaseAuthRequest): string

參數

request
BaseAuthRequest

傳回

string

繼承自 BaseClient.createTokenQueryParameters

sendPostRequest<T>(RequestThumbprint, string, NetworkRequestOptions, string)

封裝 sendPostRequestAsync 並包含必要的檢查前檢查與飛行後邏輯

function sendPostRequest<T>(thumbprint: RequestThumbprint, tokenEndpoint: string, options: NetworkRequestOptions, correlationId: string): Promise<NetworkResponse<T>>

參數

thumbprint
RequestThumbprint

請求指紋以進行限速

tokenEndpoint

string

Endpoint to POST to

options
NetworkRequestOptions

POST 請求中需包含的正文與標頭

correlationId

string

遙測的 CorreId

傳回

Promise<NetworkResponse<T>>

繼承自 BaseClient.sendPostRequest

updateAuthority(string, string)

更新用戶端的權威物件。 端點發現必須完成。

function updateAuthority(cloudInstanceHostname: string, correlationId: string): Promise<void>

參數

cloudInstanceHostname

string

correlationId

string

傳回

Promise<void>

繼承自 BaseClient.updateAuthority