ClientCredentialClient class

Предоставление учетных данных клиента OAuth2.0

Extends
@azure/msal-common.BaseClient

Унаследованные свойства

authority
logger

Методы

acquireToken(CommonClientCredentialRequest)

Общедоступный API для получения маркера с помощью ClientCredential Flow для конфиденциальных клиентов

getCachedAuthenticationResult(CommonClientCredentialRequest, ClientConfiguration | ManagedIdentityConfiguration, ICrypto, Authority, CacheManager, null | ServerTelemetryManager)

поиск кэша, если маркеры уже кэшируются

Наследуемые методы

createTokenQueryParameters(BaseAuthRequest)

Создает строку запроса для запроса /token

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

Оболочки sendPostRequestAsync с необходимой предварительной и последующей логикой

updateAuthority(string, string)

Обновляет объект центра клиента. Обнаружение конечных точек должно быть завершено.

Сведения о конструкторе

ClientCredentialClient(ClientConfiguration, IAppTokenProvider)

new ClientCredentialClient(configuration: ClientConfiguration, appTokenProvider?: IAppTokenProvider)

Параметры

configuration
@azure/msal-common.ClientConfiguration
appTokenProvider
IAppTokenProvider

Сведения об унаследованном свойстве

authority

authority: Authority

Значение свойства

@azure/msal-common.Authority

Наследуется от BaseClient.authority

logger

logger: Logger

Значение свойства

Наследуется от BaseClient.logger

Сведения о методе

acquireToken(CommonClientCredentialRequest)

Общедоступный API для получения маркера с помощью ClientCredential Flow для конфиденциальных клиентов

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

Параметры

request
CommonClientCredentialRequest

CommonClientCredentialRequest, предоставляемый разработчиком

Возвращаемое значение

Promise<null | AuthenticationResult>

getCachedAuthenticationResult(CommonClientCredentialRequest, ClientConfiguration | ManagedIdentityConfiguration, ICrypto, Authority, CacheManager, null | ServerTelemetryManager)

поиск кэша, если маркеры уже кэшируются

function getCachedAuthenticationResult(request: CommonClientCredentialRequest, config: ClientConfiguration | ManagedIdentityConfiguration, cryptoUtils: ICrypto, authority: Authority, cacheManager: CacheManager, serverTelemetryManager?: null | ServerTelemetryManager): Promise<[null | AuthenticationResult, CacheOutcome]>

Параметры

config

@azure/msal-common.ClientConfiguration | ManagedIdentityConfiguration

cryptoUtils
ICrypto
authority
@azure/msal-common.Authority
cacheManager
@azure/msal-common.CacheManager
serverTelemetryManager

null | @azure/msal-common.ServerTelemetryManager

Возвращаемое значение

Promise<[null | AuthenticationResult, CacheOutcome]>

Сведения о наследуемом методе

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