IConfidentialClientApplication interface
ConfidentialClientApplication 類別的介面,定義公開 API 簽章
方法
| acquire |
從應用程式的權威機構取得代幣(非終端使用者) |
| acquire |
透過交換從 OAuth 2.0 授權碼流程第一步收到的授權碼來取得憑證 |
| acquire |
透過將提供的刷新代幣交換為一組新的代幣來取得一個代幣 |
| acquire |
透過交換用戶端應用程式的使用者名稱與密碼來取得憑證並取得密碼授權 |
| acquire |
從申請權威機構取得代幣 |
| acquire |
當使用者指定該令牌所請求的帳戶時,會悄無聲息地取得該代幣 |
| clear |
清除快取 |
| get |
建立授權請求的網址 |
| get |
回傳記錄器實例 |
| get |
取得應用程式的標記快取 |
| Set |
這個擴充點是為了讓 Azure SDK 強化受管身份支援 |
| set |
將設定中的預設記錄器替換為新的記錄器,並有新的設定 |
方法詳細資料
acquireTokenByClientCredential(ClientCredentialRequest)
從應用程式的權威機構取得代幣(非終端使用者)
function acquireTokenByClientCredential(request: ClientCredentialRequest): Promise<null | AuthenticationResult>
參數
- request
- ClientCredentialRequest
傳回
Promise<null | AuthenticationResult>
acquireTokenByCode(AuthorizationCodeRequest)
透過交換從 OAuth 2.0 授權碼流程第一步收到的授權碼來取得憑證
function acquireTokenByCode(request: AuthorizationCodeRequest): Promise<AuthenticationResult>
參數
- request
- AuthorizationCodeRequest
傳回
Promise<AuthenticationResult>
acquireTokenByRefreshToken(RefreshTokenRequest)
透過將提供的刷新代幣交換為一組新的代幣來取得一個代幣
function acquireTokenByRefreshToken(request: RefreshTokenRequest): Promise<null | AuthenticationResult>
參數
- request
- RefreshTokenRequest
傳回
Promise<null | AuthenticationResult>
acquireTokenByUsernamePassword(UsernamePasswordRequest)
警告
此 API 現已淘汰。
- Use a more secure flow instead
透過交換用戶端應用程式的使用者名稱與密碼來取得憑證並取得密碼授權
function acquireTokenByUsernamePassword(request: UsernamePasswordRequest): Promise<null | AuthenticationResult>
參數
- request
- UsernamePasswordRequest
傳回
Promise<null | AuthenticationResult>
acquireTokenOnBehalfOf(OnBehalfOfRequest)
從申請權威機構取得代幣
function acquireTokenOnBehalfOf(request: OnBehalfOfRequest): Promise<null | AuthenticationResult>
參數
- request
- OnBehalfOfRequest
傳回
Promise<null | AuthenticationResult>
acquireTokenSilent(SilentFlowRequest)
當使用者指定該令牌所請求的帳戶時,會悄無聲息地取得該代幣
function acquireTokenSilent(request: SilentFlowRequest): Promise<null | AuthenticationResult>
參數
- request
- SilentFlowRequest
傳回
Promise<null | AuthenticationResult>
clearCache()
清除快取
function clearCache()
getAuthCodeUrl(AuthorizationUrlRequest)
建立授權請求的網址
function getAuthCodeUrl(request: AuthorizationUrlRequest): Promise<string>
參數
- request
- AuthorizationUrlRequest
傳回
Promise<string>
getLogger()
getTokenCache()
SetAppTokenProvider(IAppTokenProvider)
這個擴充點是為了讓 Azure SDK 強化受管身份支援
function SetAppTokenProvider(provider: IAppTokenProvider)
參數
- provider
- IAppTokenProvider