Package com.elasticinbox.core.account.validator.IValidator

Examples of com.elasticinbox.core.account.validator.IValidator.AccountStatus


  private IValidator validator = ValidatorFactory.getValidator();

  @Override
  protected boolean isValidRecipient(SMTPSession session, MailAddress recipient)
  {
    AccountStatus status = validator.getAccountStatus(recipient.toString());
    session.getLogger().debug("Validated account (" + recipient +  ") status is " + status);

    return status.equals(AccountStatus.ACTIVE) ? true : false;
  }
View Full Code Here


    StopWatch stopWatch = Activator.getDefault().getStopWatch();

    try {
      // authenticate mailbox, if failed return null
      AccountStatus status = validator.getAccountStatus(username);
      session.getLogger().debug("Validated account (" + username + ") status is " + status.toString());
 
      if (!status.equals(AccountStatus.ACTIVE)) {
        throw new AuthenticationException("User " + username + " does not exist or inactive");
      }
 
      // authenticate user with password
      mailbox = authenticator.authenticate(username, password);
View Full Code Here

TOP

Related Classes of com.elasticinbox.core.account.validator.IValidator.AccountStatus

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.