org.apache.cordova.CordovaPlugin#onReceivedHttpAuthRequest ( )源码实例Demo

下面列出了org.apache.cordova.CordovaPlugin#onReceivedHttpAuthRequest ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: L.TileLayer.Cordova   文件: PluginManager.java
/**
 * Called when the system received an HTTP authentication request. Plugins can use
 * the supplied HttpAuthHandler to process this auth challenge.
 *
 * @param view              The WebView that is initiating the callback
 * @param handler           The HttpAuthHandler used to set the WebView's response
 * @param host              The host requiring authentication
 * @param realm             The realm for which authentication is required
 * 
 * @return                  Returns True if there is a plugin which will resolve this auth challenge, otherwise False
 * 
 */
public boolean onReceivedHttpAuthRequest(CordovaWebView view, ICordovaHttpAuthHandler handler, String host, String realm) {
    for (CordovaPlugin plugin : this.pluginMap.values()) {
        if (plugin != null && plugin.onReceivedHttpAuthRequest(view, handler, host, realm)) {
            return true;
        }
    }
    return false;
}
 
源代码2 项目: bluemix-parking-meter   文件: PluginManager.java
/**
 * Called when the system received an HTTP authentication request. Plugins can use
 * the supplied HttpAuthHandler to process this auth challenge.
 *
 * @param view              The WebView that is initiating the callback
 * @param handler           The HttpAuthHandler used to set the WebView's response
 * @param host              The host requiring authentication
 * @param realm             The realm for which authentication is required
 * 
 * @return                  Returns True if there is a plugin which will resolve this auth challenge, otherwise False
 * 
 */
public boolean onReceivedHttpAuthRequest(CordovaWebView view, ICordovaHttpAuthHandler handler, String host, String realm) {
    for (CordovaPlugin plugin : this.pluginMap.values()) {
        if (plugin != null && plugin.onReceivedHttpAuthRequest(view, handler, host, realm)) {
            return true;
        }
    }
    return false;
}