Example usage for org.apache.cordova PluginManager onReceivedClientCertRequest

List of usage examples for org.apache.cordova PluginManager onReceivedClientCertRequest

Introduction

In this page you can find the example usage for org.apache.cordova PluginManager onReceivedClientCertRequest.

Prototype

public boolean onReceivedClientCertRequest(CordovaWebView view, ICordovaClientCertRequest request) 

Source Link

Document

Called when he system received an SSL client certificate request.

Usage

From source file:com.zsxsoft.cordova.x5.X5WebViewClient.java

License:Apache License

/**
 * On received client cert request./*from w  w w  .  ja  v a2 s. co  m*/
 * The method forwards the request to any running plugins before using the default implementation.
 *
 * @param view
 * @param request
 */
@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 X5CordovaClientCertRequest(request))) {
        parentEngine.client.clearLoadTimeoutTimer();
        return;
    }

    // By default pass to WebViewClient
    super.onReceivedClientCertRequest(view, request);
}

From source file:org.jeremyup.cordova.x5engine.X5WebViewClient.java

License:Apache License

/**
 * On received client cert request.// www  .  ja  va2s. co  m
 * 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 X5CordovaClientCertRequest(request))) {
        parentEngine.client.clearLoadTimeoutTimer();
        return;
    }

    // By default pass to WebViewClient
    super.onReceivedClientCertRequest(view, request);
}