新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
創(chuàng)新互聯(lián)鴻蒙OS教程:鴻蒙OSPasswordAuthentication
PasswordAuthentication

java.lang.Object
|---java.net.PasswordAuthentication
public final class PasswordAuthentication
extends ObjectPasswordAuthentication 類是 Authenticator 使用的數(shù)據(jù)持有者。 它只是用戶名和密碼的存儲庫。
構造函數(shù)摘要
| 構造函數(shù) | 描述 |
|---|---|
| PasswordAuthentication(String userName, char[] password) | 從給定的用戶名和密碼創(chuàng)建一個新的 PasswordAuthentication 對象。 |
方法總結
| 修飾符和類型 | 方法 | 描述 |
|---|---|---|
| char[] | getPassword() | 返回用戶密碼。 |
| String | getUserName() | 返回用戶名。 |
| 從類 java.lang.Object 繼承的方法 |
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
構造函數(shù)詳細信息
PasswordAuthentication
public PasswordAuthentication(String userName, char[] password)
從給定的用戶名和密碼創(chuàng)建一個新的 PasswordAuthentication 對象。
請注意,給定的用戶密碼在存儲到新的 PasswordAuthentication 對象之前會被克隆。
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| userName | 用戶名 |
| password | 用戶密碼 |
方法詳情
getUserName
public String getUserName()
返回用戶名。
返回:
用戶名
getPassword
public char[] getPassword()
返回用戶密碼。
請注意,此方法返回對密碼的引用。 調(diào)用者有責任在不再需要密碼信息后將其清零。
返回:
密碼
網(wǎng)站欄目:創(chuàng)新互聯(lián)鴻蒙OS教程:鴻蒙OSPasswordAuthentication
鏈接地址:http://m.fisionsoft.com.cn/article/dpijogi.html


咨詢
建站咨詢
