ClientCredentialClient class

Bevilja OAuth2.0-klientautentiseringsuppgifter

Extends
@azure/msal-common.BaseClient

Ärvda egenskaper

authority
logger

Metoder

acquireToken(CommonClientCredentialRequest)

Offentligt API för att hämta en token med ClientCredential Flow för konfidentiella klienter

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

söker efter cacheminnet om token redan har cachelagrats

Ärvda metoder

createTokenQueryParameters(BaseAuthRequest)

Skapar frågesträng för /token-begäran

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

Omsluter sendPostRequestAsync med nödvändig preflight- och postflight-logik

updateAuthority(string, string)

Uppdaterar utfärdarobjektet för klienten. Slutpunktsidentifieringen måste slutföras.

Konstruktorinformation

ClientCredentialClient(ClientConfiguration, IAppTokenProvider)

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

Parametrar

configuration
@azure/msal-common.ClientConfiguration
appTokenProvider
IAppTokenProvider

Information om ärvda egenskaper

authority

authority: Authority

Egenskapsvärde

@azure/msal-common.Authority

Ärvd från BaseClient.authority

logger

logger: Logger

Egenskapsvärde

Ärvd från BaseClient.logger

Metodinformation

acquireToken(CommonClientCredentialRequest)

Offentligt API för att hämta en token med ClientCredential Flow för konfidentiella klienter

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

Parametrar

request
CommonClientCredentialRequest

CommonClientCredentialRequest tillhandahålls av utvecklaren

Returer

Promise<null | AuthenticationResult>

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

söker efter cacheminnet om token redan har cachelagrats

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

Parametrar

config

@azure/msal-common.ClientConfiguration | ManagedIdentityConfiguration

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

null | @azure/msal-common.ServerTelemetryManager

Returer

Promise<[null | AuthenticationResult, CacheOutcome]>

Ärvd metodinformation

createTokenQueryParameters(BaseAuthRequest)

Skapar frågesträng för /token-begäran

function createTokenQueryParameters(request: BaseAuthRequest): string

Parametrar

request
BaseAuthRequest

Returer

string

Ärvd från BaseClient.createTokenQueryParameters

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

Omsluter sendPostRequestAsync med nödvändig preflight- och postflight-logik

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

Parametrar

thumbprint
RequestThumbprint

Begära tumavtryck för begränsning

tokenEndpoint

string

Slutpunkt för att göra POST till

options
NetworkRequestOptions

Brödtext och rubriker som ska inkluderas i POST-begäran

correlationId

string

CorrelationId för telemetri

Returer

Promise<NetworkResponse<T>>

Ärvd från BaseClient.sendPostRequest

updateAuthority(string, string)

Uppdaterar utfärdarobjektet för klienten. Slutpunktsidentifieringen måste slutföras.

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

Parametrar

cloudInstanceHostname

string

correlationId

string

Returer

Promise<void>

Ärvd från BaseClient.updateAuthority