org.apache.commons.httpclient.auth
Class AuthScope
The class represents an authentication scope consisting of a host name,
a port number, a realm name and an authentication scheme name which
Credentials
apply to.
- Oleg Kalnichevski
- Adrian Sutton
- 3.0
static AuthScope | ANY - Default scope matching any host, port, realm and authentication scheme.
|
static String | ANY_HOST - The null value represents any host.
|
static int | ANY_PORT - The -1 value represents any port.
|
static String | ANY_REALM - The null value represents any realm.
|
static String | ANY_SCHEME - The null value represents any authentication scheme.
|
AuthScope(String host, int port) - Creates a new credentials scope for the given
host, port, any realm name, and any
authentication scheme.
|
AuthScope(String host, int port, String realm) - Creates a new credentials scope for the given
host, port, realm, and any
authentication scheme.
|
AuthScope(String host, int port, String realm, String scheme) - Creates a new credentials scope for the given
host, port, realm, and
authentication scheme.
|
AuthScope(AuthScope authscope) - Creates a copy of the given credentials scope.
|
ANY
public static AuthScope ANY
Default scope matching any host, port, realm and authentication scheme.
In the future versions of HttpClient the use of this parameter will be
discontinued.
ANY_HOST
public static final String ANY_HOST
The null value represents any host. In the future versions of
HttpClient the use of this parameter will be discontinued.
ANY_PORT
public static final int ANY_PORT
The -1 value represents any port.
- -1
ANY_REALM
public static final String ANY_REALM
The null value represents any realm.
ANY_SCHEME
public static final String ANY_SCHEME
The null value represents any authentication scheme.
AuthScope
public AuthScope(String host,
int port)
Creates a new credentials scope for the given
host, port, any realm name, and any
authentication scheme.
host
- the host the credentials apply to. May be set
to null if credenticals are applicable to
any host.port
- the port the credentials apply to. May be set
to negative value if credenticals are applicable to
any port.
- 3.0
AuthScope
public AuthScope(String host,
int port,
String realm)
Creates a new credentials scope for the given
host, port, realm, and any
authentication scheme.
host
- the host the credentials apply to. May be set
to null if credenticals are applicable to
any host.port
- the port the credentials apply to. May be set
to negative value if credenticals are applicable to
any port.realm
- the realm the credentials apply to. May be set
to null if credenticals are applicable to
any realm.
- 3.0
AuthScope
public AuthScope(String host,
int port,
String realm,
String scheme)
Creates a new credentials scope for the given
host, port, realm, and
authentication scheme.
host
- the host the credentials apply to. May be set
to null if credenticals are applicable to
any host.port
- the port the credentials apply to. May be set
to negative value if credenticals are applicable to
any port.realm
- the realm the credentials apply to. May be set
to null if credenticals are applicable to
any realm.scheme
- the authentication scheme the credentials apply to.
May be set to null if credenticals are applicable to
any authentication scheme.
- 3.0
AuthScope
public AuthScope(AuthScope authscope)
Creates a copy of the given credentials scope.
- 3.0
equals
public boolean equals(Object o)
java.lang.Object.equals(Object)
getHost
public String getHost()
- the host
- 3.0
getPort
public int getPort()
- the port
- 3.0
getRealm
public String getRealm()
- the realm name
- 3.0
getScheme
public String getScheme()
- the scheme type
- 3.0
hashCode
public int hashCode()
java.lang.Object.hashCode()
match
public int match(AuthScope that)
Tests if the authentication scopes match.
- the match factor. Negative value signifies no match.
Non-negative signifies a match. The greater the returned value
the closer the match.
- 3.0
toString
public String toString()
java.lang.Object.toString()
Copyright (c) 1999-2005 - Apache Software Foundation