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 theAuthCommand.AuthMechanism.LOGINauthorization mechanism, when that mechanism was used for authentication.
-
-
Constructor Summary
Constructors Constructor Description LoginAuthenticationState(String username, String password)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetPassword()Retrieves the password that was used forPLAINorLOGINauthentication.StringgetType()StringgetUsername()Retrieves the username that was used forPLAINorLOGINauthentication.
-
-
-
Method Detail
-
getType
public String getType()
- Specified by:
getTypein interfaceAuthenticationState- Returns:
- The type of the used authentication mechanism, e.g.
PLAINorLOGIN.
-
getUsername
public String 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
public String 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.
-
-