- java.lang.Object
-
- java.net.PasswordAuthentication
-
public final class PasswordAuthentication extends Object
クラスPasswordAuthenticationは、オーセンティケータによって使用されるデータ・ホルダーです。 これは単に、ユーザー名とパスワード用のリポジトリです。- 導入されたバージョン:
- 1.2
- 関連項目:
Authenticator
、Authenticator.getPasswordAuthentication()
-
-
コンストラクタのサマリー
コンストラクタ コンストラクタ 説明 PasswordAuthentication(String userName, char[] password)
指定されたユーザー名およびパスワードから、新しいPasswordAuthentication
オブジェクトを作成します。
-
-
-
コンストラクタの詳細
-
PasswordAuthentication
public PasswordAuthentication(String userName, char[] password)
指定されたユーザー名およびパスワードから、新しいPasswordAuthentication
オブジェクトを作成します。指定されたユーザー・パスワードは、新しい
PasswordAuthentication
オブジェクトに格納される前に複製されます。- パラメータ:
userName
−ユーザー名password
- ユーザーのパスワード
-
-
メソッドの詳細
-
getUserName
public String getUserName()
ユーザー名を返します。- 戻り値:
- ユーザー名
-
getPassword
public char[] getPassword()
ユーザーのパスワードを返します。このメソッドはパスワードへの参照を返します。 不要になったパスワード情報をゼロにする(消去する)のは、呼出し元の責任です。
- 戻り値:
- パスワード
-
-