Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-17-2011, 04:20 AM
Intermediate Member
 
Posts: 19
Default authtoken from SoapProvisioning

Hi ,

someone can help me to recover AuthToken using java SOAP API .

Code:
SoapProvisioning sp;
			sp = new SoapProvisioning();
			sp.soapSetURI("https://192.168.1.196:7071"+ com.zimbra.common.soap.AdminConstants.ADMIN_SERVICE_URI);
			sp.soapAdminAuthenticate("admin", "admin");
i try "sp.getAuthToken().getValue()" but when i put into url i can open the admin consol .
example of url "http://192.168.1.196/service/preauth?authtoken=0_8f1a51baecbcc1dd37be87746d9455 d74d8a0a70_69643d33363a33316536316333662d313830612 d346165322d623730372d6337653231393233653063303b657 8703d31333a313331353533333332353233333b6169643d333 63a38373962346330322d363039612d343765302d623835332 d6537336135383062316137383b747970653d363a7a696d627 2613b&isredirect=1&adminPreAuth=1"
i need to open the page for each account ie : simulate the "show mail" in admin consol .
Reply With Quote
  #2 (permalink)  
Old 10-18-2011, 05:43 AM
Project Contributor
 
Posts: 92
Default

You better use SoapProvisioning's delegateAuth method sending DelegateAuth SOAP request which is actually used when you click the "show mail" in admin consol.
You then get the reponse including authtoken of each account.

Here is what docs says about DelegateAuth SOAP.
Quote:
----------------------------
<DelegateAuthRequest xmlns="urn:zimbraAdmin" [duration="{duration}"]>
<account by="id|name">...</account>
</DelegateAuthRequest>

<DelegateAuthResponse>
<authToken>...</authToken>
<lifetime>...</lifetime>
</DelegateAuthResponse>

Used to request a new auth token that is valid for the specified account. The id of the auth token will be the id of the target account,
and the requesting admin's id will be stored in the auth token for auditing purposes.

{duration} = lifetime in seconds of the newly-created authtoken. defaults to 1 hour. Can't be longer then zimbraAuthTokenLifetime.

----------------------------
hope it will help you.
Reply With Quote
  #3 (permalink)  
Old 10-19-2011, 09:33 AM
Intermediate Member
 
Posts: 19
Default

Thanks you
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.