public final class AuthenticationScope extends Object implements AutoCloseable
Constructor and Description |
---|
AuthenticationScope(String host,
int port,
String realm,
String scheme,
AuthenticationType type)
Constructor for the scope of an authentication request.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
equals(Object other) |
protected void |
finalize() |
AuthenticationType |
getAuthenticationType()
Returns the authentication type, i.e., if it is needed for a server or a proxy.
|
String |
getHost()
Returns the host name of the site or proxy for which authentication is requested.
|
int |
getPort()
Returns the port number of the connection.
|
String |
getRealm()
Returns the realm of the authentication.
|
String |
getScheme()
Returns the scheme of the authentication request.
|
int |
hashCode() |
public AuthenticationScope(@NotNull String host, int port, @NotNull String realm, @NotNull String scheme, @NotNull AuthenticationType type)
host
- the host name of the site or proxy.port
- the port number of the connection.realm
- the real of the authentication request.scheme
- the scheme of the authentication request.type
- whether the scope is a server or a proxy.public void close()
close
in interface AutoCloseable
@NotNull public String getHost()
public int getPort()
If defined, it is a strict positive integer.
@NotNull public String getRealm()
@NotNull public String getScheme()
This is one of Basic
, Digest
, ...
@NotNull public AuthenticationType getAuthenticationType()