ClientCredentialClient class

OAuth2.0 istemci kimlik bilgisi verme

Extends
@azure/msal-common.BaseClient

Devralınan Özellikler

authority
logger

Yöntemler

acquireToken(CommonClientCredentialRequest)

Gizli istemciler için ClientCredential Flow ile belirteç almak için genel API

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

belirteçler zaten önbelleğe alınmışsa önbelleği arar

Devralınan Yöntemler

createTokenQueryParameters(BaseAuthRequest)

/token isteği için sorgu dizesi oluşturur

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

sendPostRequestAsync'i gerekli ön kontrol ve postflight mantığıyla sarmalar

updateAuthority(string, string)

İstemcinin authority nesnesini güncelleştirir. Uç nokta bulma işlemi tamamlanmalıdır.

Oluşturucu Ayrıntıları

ClientCredentialClient(ClientConfiguration, IAppTokenProvider)

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

Parametreler

configuration
@azure/msal-common.ClientConfiguration
appTokenProvider
IAppTokenProvider

Devralınan Özellik Detayları

authority

authority: Authority

Özellik Değeri

@azure/msal-common.Authority

Devralınan BaseClient.authority

logger

logger: Logger

Özellik Değeri

Devralınan BaseClient.logger

Yöntem Ayrıntıları

acquireToken(CommonClientCredentialRequest)

Gizli istemciler için ClientCredential Flow ile belirteç almak için genel API

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

Parametreler

request
CommonClientCredentialRequest

Geliştirici tarafından sağlanan CommonClientCredentialRequest

Döndürülenler

Promise<null | AuthenticationResult>

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

belirteçler zaten önbelleğe alınmışsa önbelleği arar

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

Parametreler

config

@azure/msal-common.ClientConfiguration | ManagedIdentityConfiguration

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

null | @azure/msal-common.ServerTelemetryManager

Döndürülenler

Promise<[null | AuthenticationResult, CacheOutcome]>

Devralınan Yöntemin Ayrıntıları

createTokenQueryParameters(BaseAuthRequest)

/token isteği için sorgu dizesi oluşturur

function createTokenQueryParameters(request: BaseAuthRequest): string

Parametreler

request
BaseAuthRequest

Döndürülenler

string

Devralınan BaseClient.createTokenQueryParameters

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

sendPostRequestAsync'i gerekli ön kontrol ve postflight mantığıyla sarmalar

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

Parametreler

thumbprint
RequestThumbprint

Azaltma için parmak izi isteme

tokenEndpoint

string

POST yapmak için uç nokta

options
NetworkRequestOptions

POST isteğine eklenecek gövde ve üst bilgiler

correlationId

string

Telemetri için CorrelationId

Döndürülenler

Promise<NetworkResponse<T>>

Devralınan BaseClient.sendPostRequest

updateAuthority(string, string)

İstemcinin authority nesnesini güncelleştirir. Uç nokta bulma işlemi tamamlanmalıdır.

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

Parametreler

cloudInstanceHostname

string

correlationId

string

Döndürülenler

Promise<void>

Devralınan Kaynak BaseClient.updateAuthority