当前位置: 首页>>代码示例>>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;未经允许,请勿转载。