語言

CredentialManager.ClearCredentialState 方法

定義

清除所有憑證提供者中目前使用者憑證狀態。

[Android.Runtime.Register("clearCredentialState", "(Landroid/credentials/ClearCredentialStateRequest;Landroid/os/CancellationSignal;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=34)]
public void ClearCredentialState(Android.Credentials.ClearCredentialStateRequest request, Android.OS.CancellationSignal? cancellationSignal, Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver callback);
[<Android.Runtime.Register("clearCredentialState", "(Landroid/credentials/ClearCredentialStateRequest;Landroid/os/CancellationSignal;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=34)>]
member this.ClearCredentialState : Android.Credentials.ClearCredentialStateRequest * Android.OS.CancellationSignal * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit

參數

request
ClearCredentialStateRequest

請求資料

cancellationSignal
CancellationSignal

一個可選的訊號,允許取消此通話

executor
IExecutor

回試將在此進行 Executor

callback
IOutcomeReceiver

當請求成功或失敗時所呼叫的回調

屬性

備註

清除所有憑證提供者中目前使用者憑證狀態。

使用者登出應用程式後,應啟動此 API,通知所有憑證提供者該應用程式儲存的憑證會話都已清除。

憑證提供者可能儲存了活躍的憑證會話,並用它來限制未來取得憑證呼叫的登入選項。 例如,它可能會優先使用該有效憑證,勝過其他可用憑證。 當你的使用者明確登出你的應用程式,並且下次想要完整的登入選項時,你應該呼叫這個 API,讓提供者清除儲存的憑證會話。

Java 文件 android.credentials.CredentialManager.clearCredentialState(android.credentials.ClearCredentialStateRequest, android.os.CancellationSignal, java.util.concurrent.Executor, android.os.OutcomeReceiver<java.lang.Void, android.credentials.ClearCredentialStateException>)

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於