Package com.sun.mail.smtp
Class SMTPTransport.Authenticator
- java.lang.Object
-
- com.sun.mail.smtp.SMTPTransport.Authenticator
-
- Direct Known Subclasses:
SMTPTransport.DigestMD5Authenticator,SMTPTransport.LoginAuthenticator,SMTPTransport.NtlmAuthenticator,SMTPTransport.OAuth2Authenticator,SMTPTransport.PlainAuthenticator
- Enclosing class:
- SMTPTransport
private abstract class SMTPTransport.Authenticator extends java.lang.ObjectAbstract base class for SMTP authentication mechanism implementations.
-
-
Constructor Summary
Constructors Constructor Description Authenticator(java.lang.String mech)Authenticator(java.lang.String mech, boolean enabled)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) booleanauthenticate(java.lang.String host, java.lang.String authzid, java.lang.String user, java.lang.String passwd)Start the authentication handshake by issuing the AUTH command.(package private) abstract voiddoAuth(java.lang.String host, java.lang.String authzid, java.lang.String user, java.lang.String passwd)(package private) booleanenabled()(package private) java.lang.StringgetInitialResponse(java.lang.String host, java.lang.String authzid, java.lang.String user, java.lang.String passwd)Provide the initial response to use in the AUTH command, or null if not supported.(package private) java.lang.StringgetMechanism()
-
-
-
Method Detail
-
getMechanism
java.lang.String getMechanism()
-
enabled
boolean enabled()
-
authenticate
boolean authenticate(java.lang.String host, java.lang.String authzid, java.lang.String user, java.lang.String passwd) throws MessagingExceptionStart the authentication handshake by issuing the AUTH command. Delegate to the doAuth method to do the mechanism-specific part of the handshake.- Throws:
MessagingException
-
getInitialResponse
java.lang.String getInitialResponse(java.lang.String host, java.lang.String authzid, java.lang.String user, java.lang.String passwd) throws MessagingException, java.io.IOExceptionProvide the initial response to use in the AUTH command, or null if not supported. Subclasses that support the initial response capability will override this method.- Throws:
MessagingExceptionjava.io.IOException
-
doAuth
abstract void doAuth(java.lang.String host, java.lang.String authzid, java.lang.String user, java.lang.String passwd) throws MessagingException, java.io.IOException- Throws:
MessagingExceptionjava.io.IOException
-
-