ClientCredentialClient class
OAuth2.0 client credential grant
- Extends
-
@azure/msal-common.BaseClient
方法
| acquire |
公開 API 用於 ClientCredential 流程取得權杖,用於機密客戶端 |
| get |
如果標記已經快取,我會查詢快取 |
繼承的方法
| create |
為 /token 請求建立查詢字串 |
| send |
封裝 sendPostRequestAsync 並包含必要的檢查前檢查與飛行後邏輯 |
| update |
更新用戶端的權威物件。 端點發現必須完成。 |
建構函式詳細資料
ClientCredentialClient(ClientConfiguration, IAppTokenProvider)
new ClientCredentialClient(configuration: ClientConfiguration, appTokenProvider?: IAppTokenProvider)
參數
- configuration
- @azure/msal-common.ClientConfiguration
- appTokenProvider
- IAppTokenProvider
繼承的屬性詳細資料
authority
authority: Authority
屬性值
繼承自 BaseClient.authority
logger
方法詳細資料
acquireToken(CommonClientCredentialRequest)
公開 API 用於 ClientCredential 流程取得權杖,用於機密客戶端
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]>
參數
- 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
傳回
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
Endpoint to POST to
- options
- NetworkRequestOptions
POST 請求中需包含的正文與標頭
- correlationId
-
string
遙測的 CorreId
傳回
Promise<NetworkResponse<T>>
繼承自 BaseClient.sendPostRequest
updateAuthority(string, string)
更新用戶端的權威物件。 端點發現必須完成。
function updateAuthority(cloudInstanceHostname: string, correlationId: string): Promise<void>
參數
- cloudInstanceHostname
-
string
- correlationId
-
string
傳回
Promise<void>
繼承自 BaseClient.updateAuthority