Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: login via php

  1. #1
    joshuamorgan is offline Active Member
    Join Date
    Sep 2005
    Posts
    42
    Rep Power
    9

    Default login via php

    hey there,

    i am currently still developing very slowly the Zimbra4PHP class. At the moment registration works great, and just needs error checking. The problem at the moment however is transparent login, that is logging into zimbra via my php application and then being transferred to zimbra without having to login again. i have issued all the correct SOAP requests, and get the authtoken. i then set cookies for *.domain.com as the domain name and do a http 'Location' header to http://wherezimbraisinstalled.com. however when i am transferred the cookie disappears, and i am not logged in. can anybody offer any help?

    if you require more details/source code, please ask.

    thanks,

    josh

  2. #2
    KevinH's Avatar
    KevinH is offline Expert Member
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    18

    Default

    What is you set the cookie for "/" and domain.com ie so * or *.

  3. #3
    joshuamorgan is offline Active Member
    Join Date
    Sep 2005
    Posts
    42
    Rep Power
    9

    Default

    header("Set-Cookie: ls_last_user=joshua@nawmaw.com; ZM_AUTH_TOKEN={$token}; path=/zimbra; domain=.shobay.com");

    header("Location: http://shobay.com/zimbra/mail");

    i'm pretty sure i intially tried setting path=/.

    thanks.

  4. #4
    KevinH's Avatar
    KevinH is offline Expert Member
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    18

    Default

    Try this:

    Code:
    header("Set-Cookie: ls_last_user=joshua@nawmaw.com; ZM_AUTH_TOKEN={$token}; path=/; domain=shobay.com");
    header("Location: http://shobay.com/zimbra/mail");
    Use / and no . in the domain.

  5. #5
    Vanildo is offline New Member
    Join Date
    Sep 2005
    Location
    Rio de Janeiro, Brazil
    Posts
    4
    Rep Power
    9

    Default

    Hi,

    I am have interest in your phpclass. Could You give me more informations? Do You plan to open source it? Can I contribute with something? Can I have access to your class?

    Thanks,

    Vanildo.

  6. #6
    joshuamorgan is offline Active Member
    Join Date
    Sep 2005
    Posts
    42
    Rep Power
    9

    Default

    yes, the class will be completely open-source and documented. i will notify via the forum on completion of the class. the first version will only have login/create account support, but as i get time over the school holidays i will add to it.

    if you want to recieve notification of when i finish the class email:

    joshua DOT morgan+zimbra4php AT gmail DOT com
    Last edited by joshuamorgan; 11-23-2005 at 11:39 PM.

  7. #7
    smies is offline Senior Member
    Join Date
    Oct 2005
    Location
    Urmond, Netherlands
    Posts
    51
    Rep Power
    9

    Default

    what is the purpose of the class that you are making?

  8. #8
    joshuamorgan is offline Active Member
    Join Date
    Sep 2005
    Posts
    42
    Rep Power
    9

    Default

    provides access to zimbra's soap calls via a php class. i.e: create accounts/login, etc. using php.

  9. #9
    joshuamorgan is offline Active Member
    Join Date
    Sep 2005
    Posts
    42
    Rep Power
    9

    Default

    ok. it appears that you can't set a cookie for another domain from one domain.

    for example:

    setting a cookie for domain y from domain x. i will have to rethink this. is there any way to put the ZM_AUTH_TOKEN into the query string, instead of sending it as a cookie?

  10. #10
    KevinH's Avatar
    KevinH is offline Expert Member
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    18

    Default

    It must be in a cookie. You should be able to set a cookie for foo.com from a.foo.com and see it on b.foo.com Is that not working for you?

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. 2nd server redirects to the master on login
    By gilran in forum Administrators
    Replies: 6
    Last Post: 01-14-2013, 08:23 PM
  2. Custom login screen for Zimbra
    By fredano in forum Administrators
    Replies: 14
    Last Post: 06-23-2011, 05:13 AM
  3. PHP Login system and zimbra
    By Thomas.Curtis in forum Administrators
    Replies: 3
    Last Post: 02-02-2007, 04:54 PM
  4. problem while building perl
    By ravinder in forum Developers
    Replies: 7
    Last Post: 05-29-2006, 09:38 AM
  5. IMAP Login Problem
    By deckard in forum Users
    Replies: 2
    Last Post: 02-09-2006, 07:10 AM

Posting Permissions

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