Search in sources :

Example 6 with Options

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);
}
Also used : TwoFactorOptions(com.zimbra.common.auth.twofactor.TwoFactorOptions) DeliveryOptions(com.zimbra.cs.mailbox.DeliveryOptions) Options(com.zimbra.client.ZMailbox.Options)

Aggregations

Options (com.zimbra.client.ZMailbox.Options)6 ZMailbox (com.zimbra.client.ZMailbox)4 ZAuthToken (com.zimbra.common.auth.ZAuthToken)3 TwoFactorOptions (com.zimbra.common.auth.twofactor.TwoFactorOptions)3 DeliveryOptions (com.zimbra.cs.mailbox.DeliveryOptions)3 Account (com.zimbra.cs.account.Account)2 AuthToken (com.zimbra.cs.account.AuthToken)2 ParsedMessageOptions (com.zimbra.cs.mime.ParsedMessageOptions)2 ParsedDateTime (com.zimbra.common.calendar.ParsedDateTime)1 ServiceException (com.zimbra.common.service.ServiceException)1 SoapFaultException (com.zimbra.common.soap.SoapFaultException)1 AccountServiceException (com.zimbra.cs.account.AccountServiceException)1 DbMailbox (com.zimbra.cs.db.DbMailbox)1 Invite (com.zimbra.cs.mailbox.calendar.Invite)1 RecurId (com.zimbra.cs.mailbox.calendar.RecurId)1 ZOrganizer (com.zimbra.cs.mailbox.calendar.ZOrganizer)1 CreateInvite (com.zimbra.cs.redolog.op.CreateInvite)1 CreateMailbox (com.zimbra.cs.redolog.op.CreateMailbox)1 DeleteMailbox (com.zimbra.cs.redolog.op.DeleteMailbox)1 RenameMailbox (com.zimbra.cs.redolog.op.RenameMailbox)1