summaryrefslogtreecommitdiff
path: root/core/java/android/webkit/WebViewClient.java
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-03-25 15:38:04 +0000
committerSteve Block <steveblock@google.com>2010-03-25 18:18:36 +0000
commitc6a90a59b342114d760d899e09d8def672b49ca8 (patch)
tree771c08a6ed08246b0c257d1af91a78e3154b03b3 /core/java/android/webkit/WebViewClient.java
parent6108af25996de29eea03205963be8994b6757116 (diff)
Provides ability to store HTTP authentication credentials supplied to an XHR from JavaScript
This change forwards to the WebViewClient HTTP authentication credentials that are supplied to an XHR from JavaScript. This allows the client to store these credentials for use with later requests. Currently, the browser only stores credentials that have been entered manually by the user through the authentication dialog. Bug: 2544330 Change-Id: I913e35d80b7ad41ff75586092408b86ea9f543d8
Diffstat (limited to 'core/java/android/webkit/WebViewClient.java')
-rw-r--r--core/java/android/webkit/WebViewClient.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/core/java/android/webkit/WebViewClient.java b/core/java/android/webkit/WebViewClient.java
index 02c721009b10..4ac660e68513 100644
--- a/core/java/android/webkit/WebViewClient.java
+++ b/core/java/android/webkit/WebViewClient.java
@@ -197,6 +197,22 @@ public class WebViewClient {
}
/**
+ * Notify the host application that authentication credentials have been
+ * supplied from Script.
+ * The default behavior is to do nothing.
+ * @hide Pending API council review
+ *
+ * @param view The WebView that is initiating the callback.
+ * @param host The host requiring authentication.
+ * @param realm A description to help store user credentials for future
+ * @param username The username
+ * @param password The password
+ */
+ public void onReceivedHttpAuthCredentials(WebView view, String host,
+ String realm, String username, String password) {
+ }
+
+ /**
* Give the host application a chance to handle the key event synchronously.
* e.g. menu shortcut key events need to be filtered this way. If return
* true, WebView will not handle the key event. If return false, WebView