ClientCredentialClient class
Bevilja OAuth2.0-klientautentiseringsuppgifter
- Extends
-
@azure/msal-common.BaseClient
Metoder
| acquire |
Offentligt API för att hämta en token med ClientCredential Flow för konfidentiella klienter |
| get |
söker efter cacheminnet om token redan har cachelagrats |
Ärvda metoder
| create |
Skapar frågesträng för /token-begäran |
| send |
Omsluter sendPostRequestAsync med nödvändig preflight- och postflight-logik |
| update |
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
Ärvd från BaseClient.authority
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
- request
- CommonClientCredentialRequest
- 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