diff options
| author | Selim Gurun <sgurun@google.com> | 2014-03-26 14:10:28 -0700 |
|---|---|---|
| committer | Selim Gurun <sgurun@google.com> | 2014-04-24 14:27:33 -0700 |
| commit | b6aa97e0a0cd13846c148716fc0c7947422cea04 (patch) | |
| tree | 54665ef060a403ddde24ba7ac1e12e78bb91f607 /core/java/android/webkit/WebViewClient.java | |
| parent | 10459a541171357a18ee897ffcfed0150600fb16 (diff) | |
Add ClientCert support
Bug: 12983007
This is to add APIs for client certificates. Keep the APIs hidden
until finalizing the design.
Change-Id: I8a1e755e2c509cf821dff7c7df0ddd5270a5f79b
Diffstat (limited to 'core/java/android/webkit/WebViewClient.java')
| -rw-r--r-- | core/java/android/webkit/WebViewClient.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/core/java/android/webkit/WebViewClient.java b/core/java/android/webkit/WebViewClient.java index e8974c6cda33..688c2518bf67 100644 --- a/core/java/android/webkit/WebViewClient.java +++ b/core/java/android/webkit/WebViewClient.java @@ -22,6 +22,8 @@ import android.os.Message; import android.view.KeyEvent; import android.view.ViewRootImpl; +import java.security.Principal; + public class WebViewClient { /** @@ -205,6 +207,30 @@ public class WebViewClient { } /** + * Notify the host application to handle a SSL client certificate + * request. The host application is responsible for showing the UI + * if desired and providing the keys. There are three ways to + * respond: proceed(), cancel() or ignore(). Webview remembers the + * response if proceed() or cancel() is called and does not + * call onReceivedClientCertRequest() again for the same host and port + * pair. Webview does not remember the response if ignore() is called. + * + * This method is called on the UI thread. During the callback, the + * connection is suspended. + * + * The default behavior is to cancel, returning no client certificate. + * + * @param view The WebView that is initiating the callback + * @param request An instance of a {@link ClientCertRequest} + * + * TODO(sgurun) unhide + * @hide + */ + public void onReceivedClientCertRequest(WebView view, ClientCertRequest request) { + request.cancel(); + } + + /** * Notifies the host application that the WebView received an HTTP * authentication request. The host application can use the supplied * {@link HttpAuthHandler} to set the WebView's response to the request. |
