|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.http.auth.AuthScope
@Contract(threading=IMMUTABLE) public class AuthScope
AuthScope
represents an authentication scope consisting of a host name,
a port number, a realm name and an authentication scheme name.
This class can also optionally contain a host of origin, if created in response to authentication challenge from a specific host.
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(org.apache.http.HttpHost origin)
Defines auth scope for a specific host of origin. |
|
AuthScope(org.apache.http.HttpHost origin,
String realm,
String schemeName)
Defines auth scope for a specific host of origin. |
|
AuthScope(String host,
int port)
Defines auth scope with the given host and port . |
|
AuthScope(String host,
int port,
String realm)
Defines auth scope with the given host , port and realm . |
|
AuthScope(String host,
int port,
String realm,
String schemeName)
Defines auth scope with the given host , port , realm , and
schemeName . |
Method Summary | |
---|---|
boolean |
equals(Object o)
|
String |
getHost()
|
org.apache.http.HttpHost |
getOrigin()
|
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
null
value represents any host. In the future versions of
HttpClient the use of this parameter will be discontinued.
public static final int ANY_PORT
-1
value represents any port.
public static final String ANY_REALM
null
value represents any realm.
public static final String ANY_SCHEME
null
value represents any authentication scheme.
public static final AuthScope ANY
Constructor Detail |
---|
public AuthScope(String host, int port, String realm, String schemeName)
host
, port
, realm
, and
schemeName
.
host
- authentication host. May be ANY_HOST
if applies
to any host.port
- authentication port. May be ANY_PORT
if applies
to any port of the host.realm
- authentication realm. May be ANY_REALM
if applies
to any realm on the host.schemeName
- authentication scheme. May be ANY_SCHEME
if applies
to any scheme supported by the host.public AuthScope(org.apache.http.HttpHost origin, String realm, String schemeName)
origin
- host of originrealm
- authentication realm. May be ANY_REALM
if applies
to any realm on the host.schemeName
- authentication scheme. May be ANY_SCHEME
if applies
to any scheme supported by the host.public AuthScope(org.apache.http.HttpHost origin)
origin
- host of originpublic AuthScope(String host, int port, String realm)
host
, port
and realm
.
host
- authentication host. May be ANY_HOST
if applies
to any host.port
- authentication port. May be ANY_PORT
if applies
to any port of the host.realm
- authentication realm. May be ANY_REALM
if applies
to any realm on the host.public AuthScope(String host, int port)
host
and port
.
host
- authentication host. May be ANY_HOST
if applies
to any host.port
- authentication port. May be ANY_PORT
if applies
to any port of the host.public AuthScope(AuthScope authscope)
Method Detail |
---|
public org.apache.http.HttpHost getOrigin()
public String getHost()
public int getPort()
public String getRealm()
public String getScheme()
public int match(AuthScope that)
public boolean equals(Object o)
equals
in class Object
Object.equals(Object)
public String toString()
toString
in class Object
Object.toString()
public int hashCode()
hashCode
in class Object
Object.hashCode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |