Compartilhar via


WebViewDatabase.ClearHttpAuthUsernamePassword Method

Definition

Clears any saved credentials for HTTP authentication.

[Android.Runtime.Register("clearHttpAuthUsernamePassword", "()V", "GetClearHttpAuthUsernamePasswordHandler")]
public abstract void ClearHttpAuthUsernamePassword ();
[<Android.Runtime.Register("clearHttpAuthUsernamePassword", "()V", "GetClearHttpAuthUsernamePasswordHandler")>]
abstract member ClearHttpAuthUsernamePassword : unit -> unit
Attributes

Remarks

Clears any saved credentials for HTTP authentication. This method only clears the username and password stored in WebViewDatabase instance. The username and password are not read from the WebViewDatabase during WebViewClient#onReceivedHttpAuthRequest. It is up to the app to do this or not.

The username and password used for http authentication might be cached in the network stack itself, and are not cleared when this method is called. WebView does not provide a special mechanism to clear HTTP authentication for implementing client logout. The client logout mechanism should be implemented by the Web site designer (such as server sending a HTTP 401 for invalidating credentials).

Java documentation for android.webkit.WebViewDatabase.clearHttpAuthUsernamePassword().

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.

Applies to

See also

  • <xref:Android.Webkit.WebView.GetHttpAuthUsernamePassword(System.String%2c+System.String)>
  • <xref:Android.Webkit.WebView.SetHttpAuthUsernamePassword(System.String%2c+System.String%2c+System.String%2c+System.String)>
  • HasHttpAuthUsernamePassword