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 Details

    • LoginAuthenticationState

      public LoginAuthenticationState(String username, String password)
      Parameters:
      username - The username from the AUTH command.
      password - The password from the AUTH command.
  • Method Details

    • getType

      public String getType()
      Specified by:
      getType in interface AuthenticationState
      Returns:
      The type of the used authentication mechanism, e.g. PLAIN or LOGIN.
    • getUsername

      public String getUsername()
      Retrieves the username that was used for PLAIN or LOGIN authentication. Note that this will return null when no authentication was performed or needed.
      Specified by:
      getUsername in interface UsernameAuthentication
      Returns:
      The username from the AUTH command.
    • getPassword

      public String getPassword()
      Retrieves the password that was used for PLAIN or LOGIN authentication. Note that this will return null when no authentication was performed or needed.
      Returns:
      The password from the AUTH command.