public final class PasswordAuthentication
extends Object
| java.lang.Object | |
| java.net.PasswordAuthentication | |
PasswordAuthentication类是Authenticator使用的数据持有者。 它只是一个用户名和密码的存储库。
Public constructors |
|
|---|---|
PasswordAuthentication(String userName, char[] password) 根据给定的用户名和密码创建一个新的 |
|
公共方法(Public methods) |
|
|---|---|
char[] |
getPassword() 返回用户密码。 |
String |
getUserName() 返回用户名。 |
继承方法(Inherited methods) |
|
|---|---|
java.lang.Object
|
|
PasswordAuthentication (String userName, char[] password)
根据给定的用户名和密码创建一个新的 PasswordAuthentication对象。
请注意,给定的用户密码在存储在新的 PasswordAuthentication对象中之前已被克隆。
| 参数(Parameters) | |
|---|---|
userName |
String: the user name |
password |
char: the user's password |
char[] getPassword ()
返回用户密码。
请注意,此方法返回对密码的引用。 在不再需要密码信息后,调用者有责任清除密码信息。
| 返回(Returns) | |
|---|---|
char[] |
the password |