@Immutable public class AuthScope extends Object
Credentials
apply to.Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
AuthScope(AuthScope authscope)
Creates a copy of the given credentials scope.
|
AuthScope(HttpHost host) |
AuthScope(HttpHost host,
String realm,
String schemeName) |
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.
|
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
public AuthScope(String host, int port, String realm, String scheme)
host
- the host the credentials apply to. May be set
to null if credentials are applicable to
any host.port
- the port the credentials apply to. May be set
to negative value if credentials are applicable to
any port.realm
- the realm the credentials apply to. May be set
to null if credentials are applicable to
any realm.scheme
- the authentication scheme the credentials apply to.
May be set to null if credentials are applicable to
any authentication scheme.public AuthScope(HttpHost host)
public AuthScope(String host, int port, String realm)
host
- the host the credentials apply to. May be set
to null if credentials are applicable to
any host.port
- the port the credentials apply to. May be set
to negative value if credentials are applicable to
any port.realm
- the realm the credentials apply to. May be set
to null if credentials are applicable to
any realm.public AuthScope(String host, int port)
host
- the host the credentials apply to. May be set
to null if credentials are applicable to
any host.port
- the port the credentials apply to. May be set
to negative value if credentials are applicable to
any port.public AuthScope(AuthScope authscope)
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()
Copyright © 1999–2013 The Apache Software Foundation. All rights reserved.