本文整理汇总了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);
}
示例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);
}
示例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);
}
}
示例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);
}
}
示例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"));
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
示例10: onReceivedHttpAuthRequest
import android.webkit.HttpAuthHandler; //导入方法依赖的package包/类
@Override
public void onReceivedHttpAuthRequest(WebView view, HttpAuthHandler handler, String host, String realm) {
handler.proceed("user", "pwd");
}
示例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);
}
示例12: onReceivedHttpAuthRequest
import android.webkit.HttpAuthHandler; //导入方法依赖的package包/类
@Override
public void onReceivedHttpAuthRequest(WebView view,
HttpAuthHandler handler, String host, String realm) {
handler.proceed(httpuser, httppassword);
}