Results 1 to 3 of 3

Thread: authtoken from SoapProvisioning

Hybrid View

  1. #1
    Join Date
    Mar 2011
    Posts
    23
    Rep Power
    4

    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 .

  2. #2
    Join Date
    Oct 2009
    Location
    Tokyo
    Posts
    113
    Rep Power
    6

    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.
    ----------------------------
    <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.

  3. #3
    Join Date
    Mar 2011
    Posts
    23
    Rep Power
    4

    Default

    Thanks you

Similar Threads

  1. Replies: 0
    Last Post: 08-03-2011, 02:18 PM
  2. zmmaillbox - authtokenfile and authtoken
    By afs-vpr in forum Administrators
    Replies: 0
    Last Post: 03-03-2011, 07:24 AM
  3. [SOLVED] help about SoapProvisioning
    By majodo in forum Developers
    Replies: 14
    Last Post: 03-20-2008, 04:43 AM
  4. Replies: 2
    Last Post: 10-24-2007, 09:19 AM
  5. [SOLVED] authToken lifetime == 43199999 ?
    By marsi in forum Developers
    Replies: 4
    Last Post: 08-23-2007, 02:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •