use of com.zimbra.client.ZMailbox.Options in project zm-mailbox by Zimbra.
the class TestUtil method testAuth.
public static ZAuthResult testAuth(ZMailbox mbox, String account, String password, String twoFactorCode) throws ServiceException {
Options options = new Options();
options.setAccount(account);
options.setPassword(password);
if (twoFactorCode != null) {
options.setTwoFactorCode(twoFactorCode);
}
return mbox.authByPassword(options, password);
}
Aggregations