Name

PasswordAuthentication

Synopsis

A holder object for a username/password pair, used along with an Authenticator object to log in to a protected messaging resource.

public final class PasswordAuthentication {
// Public Constructors
   public PasswordAuthentication(String userName, 
        String password);  
// Public Instance Methods
   public String getPassword();  
   public String getUserName();  
}

Passed To

javax.mail.Session.setPasswordAuthentication()

Returned By

javax.mail.Authenticator.getPasswordAuthentication(), javax.mail.Session.{getPasswordAuthentication(), requestPasswordAuthentication()}

Get Java Enterprise in a Nutshell, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.