Uses of Class
java.net.Authenticator
Package
Description
Provides the classes for implementing networking applications.
HTTP Client and WebSocket APIs
-
Uses of Authenticator in java.net
Modifier and TypeMethodDescriptionstatic Authenticator
Authenticator.getDefault()
Gets the default authenticator.Modifier and TypeMethodDescriptionstatic PasswordAuthentication
Authenticator.requestPasswordAuthentication
(Authenticator authenticator, String host, InetAddress addr, int port, String protocol, String prompt, String scheme, URL url, Authenticator.RequestorType reqType) Ask the givenauthenticator
for a password.void
HttpURLConnection.setAuthenticator
(Authenticator auth) Supplies anAuthenticator
to be used when authentication is requested through the HTTP protocol for thisHttpURLConnection
.static void
Authenticator.setDefault
(Authenticator a) Sets the authenticator that will be used by the networking code when a proxy or an HTTP server asks for authentication. -
Uses of Authenticator in java.net.http
Modifier and TypeMethodDescriptionabstract Optional<Authenticator>
HttpClient.authenticator()
Returns anOptional
containing theAuthenticator
set on this client.Modifier and TypeMethodDescriptionHttpClient.Builder.authenticator
(Authenticator authenticator) Sets an authenticator to use for HTTP authentication.