當前位置: 首頁>>代碼示例>>Java>>正文


Java HttpAuthHandler.proceed方法代碼示例

本文整理匯總了Java中android.webkit.HttpAuthHandler.proceed方法的典型用法代碼示例。如果您正苦於以下問題:Java HttpAuthHandler.proceed方法的具體用法?Java HttpAuthHandler.proceed怎麽用?Java HttpAuthHandler.proceed使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.webkit.HttpAuthHandler的用法示例。


在下文中一共展示了HttpAuthHandler.proceed方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onReceivedHttpAuthRequest

import android.webkit.HttpAuthHandler; //導入方法依賴的package包/類
/**
 * On received http auth request.
 * The method reacts on all registered authentication tokens. There is one and only one authentication token for any host + realm combination
 */
@Override
public void onReceivedHttpAuthRequest(WebView view, HttpAuthHandler handler, String host, String realm) {

    // Get the authentication token (if specified)
    AuthenticationToken token = this.getAuthenticationToken(host, realm);
    if (token != null) {
        handler.proceed(token.getUserName(), token.getPassword());
        return;
    }

    // Check if there is some plugin which can resolve this auth challenge
    PluginManager pluginManager = this.parentEngine.pluginManager;
    if (pluginManager != null && pluginManager.onReceivedHttpAuthRequest(null, new CordovaHttpAuthHandler(handler), host, realm)) {
        parentEngine.client.clearLoadTimeoutTimer();
        return;
    }

    // By default handle 401 like we'd normally do!
    super.onReceivedHttpAuthRequest(view, handler, host, realm);
}
 
開發者ID:whtsky,項目名稱:ShaPaoZi-Mobile,代碼行數:25,代碼來源:SystemWebViewClient.java

示例2: onReceivedHttpAuthRequest

import android.webkit.HttpAuthHandler; //導入方法依賴的package包/類
/**
 * On received http auth request.
 * The method reacts on all registered authentication tokens. There is one and only one authentication token for any host + realm combination
 *
 * @param view
 * @param handler
 * @param host
 * @param realm
 */
@Override
public void onReceivedHttpAuthRequest(WebView view, HttpAuthHandler handler, String host, String realm) {

    // Get the authentication token (if specified)
    AuthenticationToken token = this.getAuthenticationToken(host, realm);
    if (token != null) {
        handler.proceed(token.getUserName(), token.getPassword());
        return;
    }

    // Check if there is some plugin which can resolve this auth challenge
    PluginManager pluginManager = this.appView.pluginManager;
    if (pluginManager != null && pluginManager.onReceivedHttpAuthRequest(this.appView, new CordovaHttpAuthHandler(handler), host, realm)) {
        this.appView.loadUrlTimeout++;
        return;
    }

    // By default handle 401 like we'd normally do!
    super.onReceivedHttpAuthRequest(view, handler, host, realm);
}
 
開發者ID:aabognah,項目名稱:LoRaWAN-Smart-Parking,代碼行數:30,代碼來源:CordovaWebViewClient.java

示例3: onReceivedHttpAuthRequest

import android.webkit.HttpAuthHandler; //導入方法依賴的package包/類
@Override
public void onReceivedHttpAuthRequest(WebView view, final HttpAuthHandler handler, final String host, final String realm) {
    String userName = null;
    String userPass = null;

    if (handler.useHttpAuthUsernamePassword() && view != null) {
        String[] haup = view.getHttpAuthUsernamePassword(host, realm);
        if (haup != null && haup.length == 2) {
            userName = haup[0];
            userPass = haup[1];
        }
    }

    if (userName != null && userPass != null) {
        handler.proceed(userName, userPass);
    } else {
        showHttpAuthDialog(handler, host, realm, null, null, null);
    }
}
 
開發者ID:jjhesk,項目名稱:EZWebView,代碼行數:20,代碼來源:HBClient.java

示例4: onReceivedHttpAuthRequest

import android.webkit.HttpAuthHandler; //導入方法依賴的package包/類
@Override
public void onReceivedHttpAuthRequest(WebView view, final HttpAuthHandler handler, final String host, final String realm) {
	String username = null;
       String password = null;	        
				
       boolean reuseHttpAuthUsernamePassword = handler.useHttpAuthUsernamePassword();
       
       if (reuseHttpAuthUsernamePassword && view != null) {
           String[] credentials = view.getHttpAuthUsernamePassword(
                   host, realm);
           if (credentials != null && credentials.length == 2) {
               username = credentials[0];
               password = credentials[1];
           }
       }

       if (username != null && password != null) {
           handler.proceed(username, password);
       } else {
		showHttpAuthDialog(handler, host, realm);
       }
}
 
開發者ID:vikingbrain,項目名稱:droidedmediatank,代碼行數:23,代碼來源:CustomWebView.java

示例5: onReceivedHttpAuthRequest

import android.webkit.HttpAuthHandler; //導入方法依賴的package包/類
@Override
public void onReceivedHttpAuthRequest(WebView view,
        HttpAuthHandler handler, String host, String realm) {
  
  String TTD_PREFIX = "??TTD?";
  String paramsList = uri.getQuery();
  String driverParams = paramsList.substring(paramsList.indexOf(TTD_PREFIX) + TTD_PREFIX.length());

  Map<String, String> sessionSettings = TouchTestHelper.getLaunchParams(driverParams);
  handler.proceed(sessionSettings.get("basicAuthUsername"), sessionSettings.get("basicAuthPassword"));

}
 
開發者ID:SOASTA,項目名稱:touchtestweb-android,代碼行數:13,代碼來源:SimpleWebViewClient.java

示例6: onReceivedHttpAuthRequest

import android.webkit.HttpAuthHandler; //導入方法依賴的package包/類
@Override
public void onReceivedHttpAuthRequest(WebView view,
		HttpAuthHandler handler, String host, String realm)
{
	
	if (this.username != null && this.password != null) {
		handler.proceed(this.username, this.password);
	}
}
 
開發者ID:chreck,項目名稱:movento-webview,代碼行數:10,代碼來源:TiWebViewClient.java

示例7: onReceivedHttpAuthRequest

import android.webkit.HttpAuthHandler; //導入方法依賴的package包/類
/**
 * On received http auth request.
 * The method reacts on all registered authentication tokens. There is one and only one authentication token for any host + realm combination
 *
 * @param view
 * @param handler
 * @param host
 * @param realm
 */
@Override
public void onReceivedHttpAuthRequest(WebView view, HttpAuthHandler handler, String host, String realm) {

    // Get the authentication token
    AuthenticationToken token = this.getAuthenticationToken(host, realm);
    if (token != null) {
        handler.proceed(token.getUserName(), token.getPassword());
    }
    else {
        // Handle 401 like we'd normally do!
        super.onReceivedHttpAuthRequest(view, handler, host, realm);
    }
}
 
開發者ID:WinnipegAndroid,項目名稱:cordova-android-tv,代碼行數:23,代碼來源:CordovaWebViewClient.java

示例8: onReceivedHttpAuthRequest

import android.webkit.HttpAuthHandler; //導入方法依賴的package包/類
/**
 * On received http auth request.
 * The method reacts on all registered authentication tokens. There is one and only one authentication token for any host + realm combination
 */
@Override
public void onReceivedHttpAuthRequest(WebView view, HttpAuthHandler handler, String host, String realm) {

    // Get the authentication token
    AuthenticationToken token = this.getAuthenticationToken(host, realm);
    if (token != null) {
        handler.proceed(token.getUserName(), token.getPassword());
    }
    else {
        // Handle 401 like we'd normally do!
        super.onReceivedHttpAuthRequest(view, handler, host, realm);
    }
}
 
開發者ID:ZachMoreno,項目名稱:krakn,代碼行數:18,代碼來源:AndroidWebViewClient.java

示例9: onReceivedHttpAuthRequest

import android.webkit.HttpAuthHandler; //導入方法依賴的package包/類
public void onReceivedHttpAuthRequest(WebView paramWebView, HttpAuthHandler paramHttpAuthHandler, String paramString1, String paramString2)
{
  AuthenticationToken localAuthenticationToken = getAuthenticationToken(paramString1, paramString2);
  if (localAuthenticationToken != null)
  {
    paramHttpAuthHandler.proceed(localAuthenticationToken.getUserName(), localAuthenticationToken.getPassword());
    return;
  }
  super.onReceivedHttpAuthRequest(paramWebView, paramHttpAuthHandler, paramString1, paramString2);
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:11,代碼來源:CordovaWebViewClient.java

示例10: onReceivedHttpAuthRequest

import android.webkit.HttpAuthHandler; //導入方法依賴的package包/類
@Override
public void onReceivedHttpAuthRequest(WebView view, HttpAuthHandler handler, String host, String realm) {
    handler.proceed("user", "pwd");
}
 
開發者ID:miguelfreitas,項目名稱:twister-webview-app,代碼行數:5,代碼來源:twisterActivity.java

示例11: onReceivedHttpAuthRequest

import android.webkit.HttpAuthHandler; //導入方法依賴的package包/類
@Override
public void onReceivedHttpAuthRequest(WebView view, HttpAuthHandler handler, String host, String realm) {
    handler.proceed(this.username, this.password);
}
 
開發者ID:openhab,項目名稱:openhab-android,代碼行數:5,代碼來源:AnchorWebViewClient.java

示例12: onReceivedHttpAuthRequest

import android.webkit.HttpAuthHandler; //導入方法依賴的package包/類
@Override
public void onReceivedHttpAuthRequest(WebView view,
                                      HttpAuthHandler handler, String host, String realm) {
	handler.proceed(httpuser, httppassword);
}
 
開發者ID:phimpme,項目名稱:phimpme-android-v1,代碼行數:6,代碼來源:WPCOMReaderBase.java


注:本文中的android.webkit.HttpAuthHandler.proceed方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。