public interface

HttpAuthHandler

com.tencent.smtt.export.external.interfaces.HttpAuthHandler

Class Overview

Represents a request for HTTP authentication. Instances of this class are created by the WebView and passed to onReceivedHttpAuthRequest(WebView, HttpAuthHandler, String, String). The host application must call either proceed(String, String) or cancel() to set the WebView's response to the request.

Summary

Public Methods
abstract void cancel()
Instructs the WebView to cancel the authentication request.
abstract void proceed(String username, String password)
Instructs the WebView to proceed with the authentication with the given credentials.
abstract boolean useHttpAuthUsernamePassword()
Gets whether the credentials stored for the current host are suitable for use.

Public Methods

public abstract void cancel ()

Instructs the WebView to cancel the authentication request.

public abstract void proceed (String username, String password)

Instructs the WebView to proceed with the authentication with the given credentials. Credentials for use with this method can be retrieved from the WebView's store using getHttpAuthUsernamePassword(String, String).

public abstract boolean useHttpAuthUsernamePassword ()

Gets whether the credentials stored for the current host are suitable for use. Credentials are not suitable if they have previously been rejected by the server for the current request.

Returns
  • whether the credentials are suitable for use.