Example usage for org.apache.commons.httpclient.auth AuthScope getHost

List of usage examples for org.apache.commons.httpclient.auth AuthScope getHost

Introduction

In this page you can find the example usage for org.apache.commons.httpclient.auth AuthScope getHost.

Prototype

public String getHost() 

Source Link

Usage

From source file:com.gargoylesoftware.htmlunit.DefaultCredentialsProvider.java

/**
 * @param host the request host for which Credentials are asked
 * @param scope the configured authorization scope
 * @return <code>true</code> if the scope's host matches the provided one
 *///w  ww.  j a v a  2  s  .com
protected boolean matchHost(final AuthScope scope, final String host) {
    return scope.getHost() == AuthScope.ANY_HOST || scope.getHost().equals(host);
}