ClientCredentialClient class

Udzielanie poświadczeń klienta OAuth2.0

Rozszerzenie
@azure/msal-common.BaseClient

Właściwości dziedziczone

authority
logger

Metody

acquireToken(CommonClientCredentialRequest)

Publiczny interfejs API umożliwiający uzyskanie tokenu za pomocą przepływu ClientCredential dla klientów poufnych

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

wyszukuje pamięć podręczną, jeśli tokeny są już buforowane

Metody dziedziczone

createTokenQueryParameters(BaseAuthRequest)

Tworzy ciąg zapytania dla żądania /token

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

Zawija polecenia sendPostRequestAsync z wymaganą logiką wstępną i postflight

updateAuthority(string, string)

Aktualizuje obiekt urzędu klienta. Odnajdywanie punktów końcowych musi zostać ukończone.

Szczegóły konstruktora

ClientCredentialClient(ClientConfiguration, IAppTokenProvider)

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

Parametry

configuration
@azure/msal-common.ClientConfiguration
appTokenProvider
IAppTokenProvider

Szczegóły właściwości dziedziczonej

authority

authority: Authority

Wartość właściwości

@azure/msal-common.Authority

Dziedziczone z BaseClient.authority

logger

logger: Logger

Wartość właściwości

Dziedziczone z BaseClient.logger

Szczegóły metody

acquireToken(CommonClientCredentialRequest)

Publiczny interfejs API umożliwiający uzyskanie tokenu za pomocą przepływu ClientCredential dla klientów poufnych

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

Parametry

request
CommonClientCredentialRequest

CommonClientCredentialRequest dostarczone przez dewelopera

Zwraca

Promise<null | AuthenticationResult>

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

wyszukuje pamięć podręczną, jeśli tokeny są już buforowane

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

Parametry

config

@azure/msal-common.ClientConfiguration | ManagedIdentityConfiguration

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

null | @azure/msal-common.ServerTelemetryManager

Zwraca

Promise<[null | AuthenticationResult, CacheOutcome]>

Szczegóły metody dziedziczonej

createTokenQueryParameters(BaseAuthRequest)

Tworzy ciąg zapytania dla żądania /token

function createTokenQueryParameters(request: BaseAuthRequest): string

Parametry

request
BaseAuthRequest

Zwraca

string

Dziedziczone z BaseClient.createTokenQueryParameters

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

Zawija polecenia sendPostRequestAsync z wymaganą logiką wstępną i postflight

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

Parametry

thumbprint
RequestThumbprint

Żądanie odcisku palca dla ograniczania przepustowości

tokenEndpoint

string

Punkt końcowy umożliwiający wprowadzenie postu do

options
NetworkRequestOptions

Treść i nagłówki do uwzględnienia w żądaniu POST

correlationId

string

CorrelationId dla telemetrii

Zwraca

Promise<NetworkResponse<T>>

Dziedziczone z BaseClient.sendPostRequest

updateAuthority(string, string)

Aktualizuje obiekt urzędu klienta. Odnajdywanie punktów końcowych musi zostać ukończone.

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

Parametry

cloudInstanceHostname

string

correlationId

string

Zwraca

Promise<void>

Dziedziczone z BaseClient.updateAuthority