public class AuthScope
extends java.lang.Object
Credentials
apply to.Modifier and Type | Field and Description |
---|---|
static AuthScope |
ANY
Default scope matching any host, port, realm and authentication scheme.
|
static java.lang.String |
ANY_HOST
The null value represents any host.
|
static int |
ANY_PORT
The -1 value represents any port.
|
static java.lang.String |
ANY_REALM
The null value represents any realm.
|
static java.lang.String |
ANY_SCHEME
The null value represents any authentication scheme.
|
Constructor and Description |
---|
AuthScope(AuthScope authscope)
Creates a copy of the given credentials scope.
|
AuthScope(java.lang.String host,
int port)
Creates a new credentials scope for the given
host, port, any realm name, and any
authentication scheme.
|
AuthScope(java.lang.String host,
int port,
java.lang.String realm)
Creates a new credentials scope for the given
host, port, realm, and any
authentication scheme.
|
AuthScope(java.lang.String host,
int port,
java.lang.String realm,
java.lang.String scheme)
Creates a new credentials scope for the given
host, port, realm, and
authentication scheme.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getHost() |
int |
getPort() |
java.lang.String |
getRealm() |
java.lang.String |
getScheme() |
int |
hashCode() |
int |
match(AuthScope that)
Tests if the authentication scopes match.
|
java.lang.String |
toString() |
public static final java.lang.String ANY_HOST
public static final int ANY_PORT
public static final java.lang.String ANY_REALM
public static final java.lang.String ANY_SCHEME
public static final AuthScope ANY
public AuthScope(java.lang.String host, int port, java.lang.String realm, java.lang.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(java.lang.String host, int port, java.lang.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(java.lang.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)
public java.lang.String getHost()
public int getPort()
public java.lang.String getRealm()
public java.lang.String getScheme()
public int match(AuthScope that)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
Object.equals(Object)
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
Copyright (c) 1999-2005 - Apache Software Foundation