Java Code Examples for org.apache.cordova.CordovaPlugin#onReceivedHttpAuthRequest()

The following examples show how to use org.apache.cordova.CordovaPlugin#onReceivedHttpAuthRequest() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PluginManager.java    From L.TileLayer.Cordova with MIT License 3 votes vote down vote up
/**
 * 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;
}
 
Example 2
Source File: PluginManager.java    From bluemix-parking-meter with MIT License 3 votes vote down vote up
/**
 * 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;
}