Package org.apache.hc.client5.http.auth
Class AuthScope
java.lang.Object
org.apache.hc.client5.http.auth.AuthScope
AuthScope
represents an authentication scope consisting of
an application protocol, a host name, a port number, a realm name
and an authentication scheme name.- Since:
- 4.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefines auth scope with the givenhost
andport
.Defines auth scope with the givenprotocol
,host
,port
,realm
, andschemeName
.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.Defines auth scope for a specific host of origin. -
Method Summary
-
Field Details
-
protocol
-
host
-
port
private final int port -
realm
-
schemeName
-
-
Constructor Details
-
AuthScope
Defines auth scope with the givenprotocol
,host
,port
,realm
, andschemeName
.- Parameters:
protocol
- application protocol. May benull
if applies to any protocol.host
- authentication host. May benull
if applies to any host.port
- authentication port. May be-1
if applies to any port of the host.realm
- authentication realm. May benull
if applies to any realm on the host.schemeName
- authentication scheme name. May benull
if applies to any auth scheme supported by the host.
-
AuthScope
Defines auth scope for a specific host of origin.- Parameters:
origin
- host of originrealm
- authentication realm. May benull
if applies to any realm on the host.schemeName
- authentication scheme name. May benull
if applies to any auth scheme supported by the host.- Since:
- 4.2
-
AuthScope
public AuthScope(org.apache.hc.core5.http.HttpHost origin) Defines auth scope for a specific host of origin.- Parameters:
origin
- host of origin- Since:
- 4.2
-
AuthScope
Defines auth scope with the givenhost
andport
.- Parameters:
host
- authentication host. May benull
if applies to any host.port
- authentication port. May be-1
if applies to any port of the host.
-
AuthScope
Creates a copy of the given credentials scope.
-
-
Method Details
-
getProtocol
-
getHost
-
getPort
public int getPort() -
getRealm
-
getSchemeName
-
match
Tests if the authentication scopes match.- Returns:
- the match factor. Negative value signifies no match. Non-negative signifies a match. The greater the returned value the closer the match.
-
equals
-
hashCode
public int hashCode() -
toString
-