public class HttpAuthHandler extends Handler
WebViewClient.onReceivedHttpAuthRequest(android.webkit.WebView, android.webkit.HttpAuthHandler, java.lang.String, java.lang.String)
. The host application must
call either proceed(java.lang.String, java.lang.String)
or cancel()
to set the WebView's
response to the request.Handler.Callback
Constructor and Description |
---|
HttpAuthHandler() |
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Instructs the WebView to cancel the authentication request.
|
void |
proceed(String username,
String password)
Instructs the WebView to proceed with the authentication with the given
credentials.
|
boolean |
suppressDialog()
Gets whether the prompt dialog should be suppressed.
|
boolean |
useHttpAuthUsernamePassword()
Gets whether the credentials stored for the current host (i.e. the host
for which
WebViewClient.onReceivedHttpAuthRequest(android.webkit.WebView, android.webkit.HttpAuthHandler, java.lang.String, java.lang.String) was called)
are suitable for use. |
dispatchMessage, dump, getLooper, getMessageName, getTraceName, handleMessage, hasCallbacks, hasMessages, hasMessages, obtainMessage, obtainMessage, obtainMessage, obtainMessage, obtainMessage, post, postAtFrontOfQueue, postAtTime, postAtTime, postDelayed, removeCallbacks, removeCallbacks, removeCallbacksAndMessages, removeMessages, removeMessages, runWithScissors, sendEmptyMessage, sendEmptyMessageAtTime, sendEmptyMessageDelayed, sendMessage, sendMessageAtFrontOfQueue, sendMessageAtTime, sendMessageDelayed, toString
public boolean useHttpAuthUsernamePassword()
WebViewClient.onReceivedHttpAuthRequest(android.webkit.WebView, android.webkit.HttpAuthHandler, java.lang.String, java.lang.String)
was called)
are suitable for use. Credentials are not suitable if they have
previously been rejected by the server for the current request.WebView.getHttpAuthUsernamePassword(java.lang.String, java.lang.String)
public void cancel()
public void proceed(String username, String password)
WebView.getHttpAuthUsernamePassword(java.lang.String, java.lang.String)
.public boolean suppressDialog()