类的用途
java.net.Authenticator
使用 Authenticator 的包
-
Authenticator 在 java.net 中的用法
java.net 中返回 Authenticator 的方法java.net 中的方法,参数类型为 Authenticator修饰符和类型方法描述static PasswordAuthenticationAuthenticator.requestPasswordAuthentication(Authenticator authenticator, String host, InetAddress addr, int port, String protocol, String prompt, String scheme, URL url, Authenticator.RequestorType reqType) 向给定的authenticator询问密码。voidHttpURLConnection.setAuthenticator(Authenticator auth) 提供一个Authenticator以在通过 HTTP 协议为此HttpURLConnection请求身份验证时使用。static voidAuthenticator.setDefault(Authenticator a) 设置当代理或 HTTP 服务请求身份验证时网络代码将使用的身份验证器。 -
Authenticator 在 java.net.http 中的用法
返回类型中包含 Authenticator 类型参数的 java.net.http 中的方法修饰符和类型方法描述abstract Optional<Authenticator>HttpClient.authenticator()返回包含此客户端上的Authenticator集的Optional。java.net.http 中的方法,参数类型为 Authenticator