CredentialProviderService.OnClearCredentialState Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Called by the android system to clear the credential state.
[Android.Runtime.Register("onClearCredentialState", "(Landroid/service/credentials/ClearCredentialStateRequest;Landroid/os/CancellationSignal;Landroid/os/OutcomeReceiver;)V", "GetOnClearCredentialState_Landroid_service_credentials_ClearCredentialStateRequest_Landroid_os_CancellationSignal_Landroid_os_OutcomeReceiver_Handler", ApiSince=34)]
public abstract void OnClearCredentialState (Android.Service.Credentials.ClearCredentialStateRequest request, Android.OS.CancellationSignal cancellationSignal, Android.OS.IOutcomeReceiver callback);
[<Android.Runtime.Register("onClearCredentialState", "(Landroid/service/credentials/ClearCredentialStateRequest;Landroid/os/CancellationSignal;Landroid/os/OutcomeReceiver;)V", "GetOnClearCredentialState_Landroid_service_credentials_ClearCredentialStateRequest_Landroid_os_CancellationSignal_Landroid_os_OutcomeReceiver_Handler", ApiSince=34)>]
abstract member OnClearCredentialState : Android.Service.Credentials.ClearCredentialStateRequest * Android.OS.CancellationSignal * Android.OS.IOutcomeReceiver -> unit
Parameters
- request
- ClearCredentialStateRequest
The clear credential request for the provider to handle.
- cancellationSignal
- CancellationSignal
Signal for providers to listen to any cancellation requests from the android system.
- callback
- IOutcomeReceiver
Object used to relay the result of the request.
- Attributes
Remarks
Called by the android system to clear the credential state.
This api isinvoked by developers after users sign out of an app, with an intention to clear any stored credential session that providers have retained.
As a provider, you must clear any credential state, if maintained. For e.g. a provider may have stored an active credential session that is used to limit or rank sign-in options for future credential retrieval flows. When a user signs out of the app, such state should be cleared and an exhaustive list of credentials must be presented to the user on subsequent credential retrieval flows.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.