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

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

Introduction

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

Prototype

public String getRealm() 

Source Link

Usage

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

/**
 * @param scheme the request scheme for which Credentials are asked
 * @param scope the configured authorization scope
 * @return <code>true</code> if the scope's realm matches the one of the scheme
 *///w ww  .  j  av  a2  s .  c  o m
protected boolean matchRealm(final AuthScope scope, final AuthScheme scheme) {
    return scope.getRealm() == AuthScope.ANY_REALM || scope.getRealm().equals(scheme.getRealm());
}