code: public Principal authenticate() throws AlpineAuthenticationException {
          LOGGER.debug("Attempting to authenticate user: " + username);
          if (validateCredentials()) {
              try (AlpineQueryManager qm = new AlpineQueryManager()) {
                  final LdapUser user = qm.getLdapUser(username);
                  if (user != null) {
                      LOGGER.debug("Attempting to authenticate user: " + username);
                      return user;
                  } else if (LdapConnectionWrapper.USER_PROVISIONING) {
                      LOGGER.debug("The user (" + username + ") authenticated successfully but the account the account has not been provisioned");
                      return autoProvision(qm);
                  } else {
                      LOGGER.debug("The user (" + username + ") is unmapped and user provisioning is not enabled");
                      throw new AlpineAuthenticationException(AlpineAuthenticationException.CauseType.UNMAPPED_ACCOUNT);
                  }
              }
          } else {
              throw new AlpineAuthenticationException(AlpineAuthenticationException.CauseType.INVALID_CREDENTIALS);
          }
      }
docs: Authenticates the username/password combo against the directory service
  and returns a Principal if authentication is successful. Otherwise,
  returns an AuthenticationException.
  
  @return a Principal if authentication was successful
  @throws AlpineAuthenticationException when authentication is unsuccessful
  @since 1.0.0