CAS in SugarCRM

It’s possible to use Jasig CAS for SugarCRM Authentication.

First install CAS PHP then in your sugar install go to modules/Users/authentication and place CASAuthenticate. I hard coded my server settings in so make sure to edit the files for your purposes. Edit – you can get a nicer version here on github.

Then edit config.php add

'authenticationClass' => 'CASAuthenticate',

to $sugar_config = array

SugarCRM is supposed to support SAML but I haven’t been able to make it work.

Comments

12 responses to “CAS in SugarCRM”

  1. Maximilien Avatar
    Maximilien

    Hello David, Thanks for your work.
    But I have an issue during the integration of your files

    Firstly: UserAuthenticateClass.php in not used, why is it on the folder ?

    Secondly : i have that error :

    phpCAS error: phpCAS::client(): Another session was started before phpcas. Either disable the session handling for phpcas in the client() call or modify your application to leave session handling to phpcas in /var/www/SugarCE-Full-6.2.0beta3/modules/Users/authentication/CASAuthenticate/CASAuthenticateUser.php on line 31

    And I don’t know how to fix it yet,
    please help me
    Max

    Like

  2. Maximilien Avatar
    Maximilien

    Problem solved,
    went into CAS.php and changed the Client() function’s last argument to FALSE.

    Like

    1. david Avatar
      david

      Glad you figured it out. I’d love make a real sugar plugin I just need the time. Those files are a huge hack, there’s probably a lot of unnecessary code.

      Like

  3. sugarcrm vs vtiger Avatar

    could also work for vtiger ? 🙂

    Like

  4. sugarcrm developer Avatar

    btw .. looks like sugar 6.2 is going to have some great improvements 🙂

    Like

  5. Keith Conger Avatar
    Keith Conger

    Where can I get a copy of “CASAuthenticate” the link is now dead?

    Thanks

    Like

  6. Alfred B. Avatar
    Alfred B.

    Hello David,
    Thanks for the info. We are looking to integrate CAS with our SugarCRM 6.5 installation but noticed the CASAuthenticate file you reference above is missing. Was wondering if maybe you had it somewhere else on the interwebs.

    Thanks for any help.

    Like

  7. admin Avatar
    admin

    I’ve fixed the link. I still works for me in 6.4 and presumably 6.5. Never had an issue with updates.

    Still a hard coded hack.

    Like

  8. Keith Conger Avatar
    Keith Conger

    Thanks for fixing the link! I’ll let you know how it goes.

    Like

  9. Alfred B. Avatar

    Thanks a lot for the code David. I was able to get everything working with help from Maximilien’s second comment above.

    I took the liberty to place the files on Github so maybe more people can have access to it, and help to improve it. I took out the hardcoding so people can just edit the config.php file.

    I tried to give you credit. Check out the repo at https://github.com/algorgeous/SugarCRM-CAS

    Like

    1. admin Avatar
      admin

      Thanks I’ll update the post to direct to your github page.

      Like

  10. Gopi Avatar
    Gopi

    Parse error: syntax error, unexpected $end, expecting T_FUNCTION in /opt/installs/test/CAS-1.3.1/CAS/Client.php on line 603

    I am struck with this error…could anyone please help me???

    Like

Leave a comment