Name

Authenticator

Synopsis

This class retrieves authentication information for a network resource. Subclasses of Authenticator are registered with the JavaMail session at startup, and the Session object will call the getPasswordAuthentication() method when user authentication must be performed. The getRequestingXXX() methods are implemented by the system, and can be used by implementations to retrieve information about the requesting user.

public abstract class Authenticator {
// Public Constructors
   public Authenticator();  
// Protected Instance Methods
   protected final String getDefaultUserName();  
   protected javax.mail.PasswordAuthentication getPasswordAuthentication(  // constant
        );  
   protected final int getRequestingPort();  
   protected final String getRequestingPrompt();  
   protected final String getRequestingProtocol();  
   protected final java.net.InetAddress getRequestingSite();  
}

Passed To

javax.mail.Session.{getDefaultInstance(), getInstance()}

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.