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 09-22-2011, 05:43 AM
Intermediate Member
 
Posts: 17
Question Logging in to Zimbra via non-Browser client

Hello, all!

1) i am not 100% sure this is the proper forum for this question, but i found no "generic questions" forum (or similar).

2) Until today i was just an innocent Zimbra user (HTML client), so i'm not at all familar with Zimbras private parts and may just be overlooking something which is obvious...

My company uses Zimbra and would like to port an internal "Who's In/Out of The Office" calendar based on Zimbras calendar data. i've been poking around the AJAX API (mostly via snooping the request/response JSON via Chrome dev tools) and i've come across what appears to be a big hurdle... (but is more likely an oversight on my part).

The only mechanism i can find to do a login assumes the client is a browser. i've scoured the various text files which informally describe the requests and have not yet found a login request.

Is it possible to log in to Zimbra using a non-browser client? My client would be roughly 95% JavaScript and 5% PHP, and i need to be able to receive/send the auth token outside of the HTTP headers. i.e. i cannot rely on cookies support and plan on manually managing the auth token.

If it is indeed not possible to perform a login via the AJAX API then i can kill this project before it starts.

:-?
Reply With Quote
  #2 (permalink)  
Old 09-22-2011, 06:32 AM
Intermediate Member
 
Posts: 17
Default

Nevermind, i found it: AuthRequest. i was searching all over for "login", which doesn't appear anywhere in the docs near that request.
Reply With Quote
  #3 (permalink)  
Old 09-23-2011, 01:19 AM
Member
 
Posts: 10
Default

will you be able to help me with that
Reply With Quote
  #4 (permalink)  
Old 09-23-2011, 02:56 AM
Intermediate Member
 
Posts: 17
Default

Quote:
Originally Posted by vikramsra View Post
will you be able to help me with that
i haven't yet tried it, but will be trying it today or tomorrow. In principal it's easy, though - you send off the request and read the auth token from the response. According to the docs the request/response look like:

Code:
<AuthRequest xmlns="urn:zimbraAccount">
   [<account by="name|id|foreignPrincipal">...</account>]
   [<password>...</password>]
   [<preauth timestamp="{timestamp}" expires="{expires}">{computed-preauth-value}</preauth>]
   [<authToken>...</authToken>]
   [<virtualHost>{virtual-host}</virtualHost>]
   [<prefs>[<pref name="..."/>...]</prefs>]
   [<attrs>[<attr name="..."/>...]</attrs>]
   [<requestedSkin>{skin}</requestedSkin>]
 </AuthRequest>

 <AuthResponse">
   <authToken>...</authToken>
   <lifetime>...</lifetime>
   <session .../>
   <refer>{mail-host}</refer>
   [<prefs><pref name="{name}" modified="{modified-time}">{value}</pref>...</prefs>]
   [<attrs><attr name="{name}">{value}</attr>...</attrs>]
   [<skin>{skin-name}</skin>]
 </AuthResponse>
Reply With Quote
  #5 (permalink)  
Old 09-25-2011, 07:29 PM
Member
 
Posts: 10
Default

will you be able to provide me a script which works coz i am poor in scripting
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.