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.Object
Abstract 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) boolean
authenticate(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 void
doAuth(java.lang.String host, java.lang.String authzid, java.lang.String user, java.lang.String passwd)
(package private) boolean
enabled()
(package private) java.lang.String
getInitialResponse(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.String
getMechanism()
-
-
-
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 MessagingException
Start 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.IOException
Provide 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:
MessagingException
java.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:
MessagingException
java.io.IOException
-
-