|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.commons.httpclient.auth.AuthScope
public 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.
| Field Summary | |
|---|---|
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. |
| Constructor Summary | |
|---|---|
AuthScope(AuthScope authscope)
Creates a copy of the given credentials scope. |
|
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. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object o)
|
String |
getHost()
|
int |
getPort()
|
String |
getRealm()
|
String |
getScheme()
|
int |
hashCode()
|
int |
match(AuthScope that)
Tests if the authentication scopes match. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String ANY_HOST
public static final int ANY_PORT
public static final String ANY_REALM
public static final String ANY_SCHEME
public static final AuthScope ANY
| Constructor Detail |
|---|
public AuthScope(String host,
int port,
String realm,
String 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.
public AuthScope(String host,
int port,
String realm)
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.
public AuthScope(String host,
int port)
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.public AuthScope(AuthScope authscope)
authscope - | Method Detail |
|---|
public String getHost()
public int getPort()
public String getRealm()
public String getScheme()
public int match(AuthScope that)
that -
public boolean equals(Object o)
equals in class Objectpublic String toString()
toString in class Objectpublic int hashCode()
hashCode in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||