Thread: LDAP required?
View Single Post
  #6 (permalink)  
Old 10-26-2005, 08:06 PM
KevinH KevinH is offline
Zimbra Employee
 
Posts: 4,784
Default

Quote:
Originally Posted by bmiddleton
The only issue I'm still working on is single logon, so when they log into the portal the are automatically logged into Zimbra. Maybe one of the Zimbra guys can help me with that one....?
Single sign on is easy. You just need to use our SOAP API (see ZimbraServer/docs/soap.txt in the source for full details) to get an auth token from the server using the username/password. Then set the auth token a cookie and finally redirect them to Zimbra.

A sample SOAP request is attached.

The Java code to set the cookie and redirect would be:

Code:
Cookie authCookie = new Cookie("ZM_AUTH_TOKEN", authToken);
authCookie.setPath("/");
res.addCookie(authCookie);
res.sendRedirect("http://yourzimbrahost.example.com/");
Attached Files
File Type: txt authrequest.txt (318 Bytes, 370 views)
Reply With Quote