モジュール java.base
パッケージ java.net

クラスPasswordAuthentication



  • public final class PasswordAuthentication
    extends Object
    クラスPasswordAuthenticationは、オーセンティケータによって使用されるデータ・ホルダーです。 これは単に、ユーザー名とパスワード用のリポジトリです。
    導入されたバージョン:
    1.2
    関連項目:
    AuthenticatorAuthenticator.getPasswordAuthentication()
    • コンストラクタの詳細

      • PasswordAuthentication

        public PasswordAuthentication​(String userName,
                                      char[] password)
        指定されたユーザー名およびパスワードから、新しいPasswordAuthenticationオブジェクトを作成します。

        指定されたユーザー・パスワードは、新しいPasswordAuthenticationオブジェクトに格納される前に複製されます。

        パラメータ:
        userName−ユーザー名
        password - ユーザーのパスワード
    • メソッドの詳細

      • getUserName

        public String getUserName​()
        ユーザー名を返します。
        戻り値:
        ユーザー名
      • getPassword

        public char[] getPassword​()
        ユーザーのパスワードを返します。

        このメソッドはパスワードへの参照を返します。 不要になったパスワード情報をゼロにする(消去する)のは、呼出し元の責任です。

        戻り値:
        パスワード