Search in sources :

Example 1 with CordovaClientCertRequest

use of org.apache.cordova.CordovaClientCertRequest in project cordova-android by apache.

the class SystemWebViewClient method onReceivedClientCertRequest.

/**
     * On received client cert request.
     * The method forwards the request to any running plugins before using the default implementation.
     *
     * @param view
     * @param request
     */
@Override
@TargetApi(21)
public void onReceivedClientCertRequest(WebView view, ClientCertRequest request) {
    // Check if there is some plugin which can resolve this certificate request
    PluginManager pluginManager = this.parentEngine.pluginManager;
    if (pluginManager != null && pluginManager.onReceivedClientCertRequest(null, new CordovaClientCertRequest(request))) {
        parentEngine.client.clearLoadTimeoutTimer();
        return;
    }
    // By default pass to WebViewClient
    super.onReceivedClientCertRequest(view, request);
}
Also used : PluginManager(org.apache.cordova.PluginManager) CordovaClientCertRequest(org.apache.cordova.CordovaClientCertRequest) TargetApi(android.annotation.TargetApi)

Aggregations

TargetApi (android.annotation.TargetApi)1 CordovaClientCertRequest (org.apache.cordova.CordovaClientCertRequest)1 PluginManager (org.apache.cordova.PluginManager)1