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-21-2011, 01:03 AM
Beginner Member
 
Posts: 1
Default SSO From zimbra to an other portail

Hi,

I'm trying to test SSO between zimbra and my company's portail. I succeed in connecting from portail to zimbra with the script below.

However i would also like to connect from zimbra or another site to my portail, but i dont' know if it's possible, and how to do it?

Zimbra and the portail are using the same directory for connection.

PHP Code:
<?php
    
/**
    * Globals. Can be stored in external config.inc.php or retreived from a DB.
    */
    
$PREAUTH_KEY="0f6f5bbf7f3ee4e99e2d24a7091e262db37eb9542bc921b2ae4434fcb6338284";
    
$WEB_MAIL_PREAUTH_URL="http://zimbra.server.com/service/preauth";
    
    
/**
    * User's email address and domain. In this example obtained from a GET query parameter. 
    * i.e. preauthExample.php?email=user@domain.com&domain=domain.com
    * You could also parse the email instead of passing domain as a separate parameter
    */
    
$user $_GET["user"];
    
$domain=$_GET["domain"];
       
    
$email "{$user}@{$domain}";

    if(empty(
$PREAUTH_KEY)) {
        die(
"Need preauth key for domain ".$domain);
    }
    
    
/**
    * Create preauth token and preauth URL
    */
    
$timestamp=time()*1000;
    
$preauthToken=hash_hmac("sha1",$email."|name|0|".$timestamp,$PREAUTH_KEY);
    
$preauthURL $WEB_MAIL_PREAUTH_URL."?account=".$email."&by=name&timestamp=".$timestamp."&expires=0&preauth=".$preauthToken;
    
    
/**
     * Redirect to Zimbra preauth URL
     */
    
header("Location: $preauthURL");
?>
Thanks for your help and i apologize for my english if i made mistakes.
Reply With Quote
  #2 (permalink)  
Old 09-24-2011, 03:10 AM
Project Contributor
 
Posts: 92
Default

Maybe it is pretty much up to your "portail".
So it is not easy to answer to your question here.

If you tell us about your portail, such as you develop it on your own or it is third party product, we can tell something more.
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.