public final class PasswordAuthentication extends Object
Authenticator,
Authenticator.getPasswordAuthentication()
| Constructor and Description |
|---|
PasswordAuthentication(String userName, char[] password)
创建从给定的用户名和密码,一个新的
PasswordAuthentication对象。
|
public PasswordAuthentication(String userName, char[] password)
PasswordAuthentication对象。
注意,给定的是克隆之前,它是存储在新的PasswordAuthentication对象的用户密码。
userName -用户名
password -用户的密码
public String getUserName()
public char[] getPassword()
请注意,此方法返回一个引用的密码。它是调用方的责任,以零出密码信息后,它不再需要。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.