Package com.icegreen.greenmail.smtp.auth
Class LoginAuthenticationState
java.lang.Object
com.icegreen.greenmail.smtp.auth.LoginAuthenticationState
- All Implemented Interfaces:
AuthenticationState,UsernameAuthentication
public class LoginAuthenticationState
extends Object
implements AuthenticationState, UsernameAuthentication
Details from the
AuthCommand.AuthMechanism.LOGIN authorization mechanism, when
that mechanism was used for authentication.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the password that was used forPLAINorLOGINauthentication.getType()Retrieves the username that was used forPLAINorLOGINauthentication.
-
Constructor Details
-
LoginAuthenticationState
- Parameters:
username- The username from the AUTH command.password- The password from the AUTH command.
-
-
Method Details
-
getType
- Specified by:
getTypein interfaceAuthenticationState- Returns:
- The type of the used authentication mechanism, e.g.
PLAINorLOGIN.
-
getUsername
Retrieves the username that was used forPLAINorLOGINauthentication. Note that this will returnnullwhen no authentication was performed or needed.- Specified by:
getUsernamein interfaceUsernameAuthentication- Returns:
- The username from the AUTH command.
-
getPassword
Retrieves the password that was used forPLAINorLOGINauthentication. Note that this will returnnullwhen no authentication was performed or needed.- Returns:
- The password from the AUTH command.
-