OnBehalfOfClient class

on-Behalf-Of 客户端

扩展
@azure/msal-common.BaseClient

继承属性

authority
logger

方法

acquireToken(CommonOnBehalfOfRequest)

用于代表流获取令牌的公共 API

继承的方法

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

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

将 POST 设置为的终结点

options
NetworkRequestOptions

要包含在 POST 请求中的正文和标头

correlationId

string

遥测的 CorrelationId

返回

Promise<NetworkResponse<T>>

继承自 BaseClient.sendPostRequest

updateAuthority(string, string)

更新客户端的颁发机构对象。 终结点发现必须完成。

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

参数

cloudInstanceHostname

string

correlationId

string

返回

Promise<void>

继承自 BaseClient.updateAuthority