@Contract(threading=IMMUTABLE) public class AuthScope extends Object
AuthScope
represents an authentication scope consisting of
an application protocol, a host name, a port number, a realm name
and an authentication scheme name.Constructor and Description |
---|
AuthScope(AuthScope authScope)
Creates a copy of the given credentials scope.
|
AuthScope(org.apache.hc.core5.http.HttpHost origin)
Defines auth scope for a specific host of origin.
|
AuthScope(org.apache.hc.core5.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 protocol,
String host,
int port,
String realm,
String schemeName)
Defines auth scope with the given
protocol , host , port ,
realm , and schemeName . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getHost() |
int |
getPort() |
String |
getProtocol() |
String |
getRealm() |
String |
getSchemeName() |
int |
hashCode() |
int |
match(AuthScope that)
Tests if the authentication scopes match.
|
String |
toString() |
public AuthScope(String protocol, String host, int port, String realm, String schemeName)
protocol
, host
, port
,
realm
, and schemeName
.protocol
- application protocol. May be null
if applies
to any protocol.host
- authentication host. May be null
if applies
to any host.port
- authentication port. May be -1
if applies
to any port of the host.realm
- authentication realm. May be null
if applies
to any realm on the host.schemeName
- authentication scheme name. May be null
if applies
to any auth scheme supported by the host.public AuthScope(org.apache.hc.core5.http.HttpHost origin, String realm, String schemeName)
origin
- host of originrealm
- authentication realm. May be null
if applies
to any realm on the host.schemeName
- authentication scheme name. May be null
if applies
to any auth scheme supported by the host.public AuthScope(org.apache.hc.core5.http.HttpHost origin)
origin
- host of originpublic AuthScope(String host, int port)
host
and port
.host
- authentication host. May be null
if applies
to any host.port
- authentication port. May be -1
if applies
to any port of the host.public AuthScope(AuthScope authScope)
public String getProtocol()
public String getHost()
public int getPort()
public String getRealm()
public String getSchemeName()
public int match(AuthScope that)
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.