use of com.zimbra.common.auth.ZAuthToken in project zm-mailbox by Zimbra.
the class TestUtil method getZMailboxAsAdmin.
public static ZMailbox getZMailboxAsAdmin(String username) throws ServiceException {
ZAuthToken adminAuthToken = newSoapProvisioning().getAuthToken();
ZMailbox.Options options = new ZMailbox.Options(adminAuthToken, getSoapUrl());
options.setTargetAccount(getAddress(username));
options.setTargetAccountBy(AccountBy.name);
return ZMailbox.getMailbox(options);
}
Aggregations