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.

12 thoughts on “CAS in SugarCRM”

  1. 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

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

  3. 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.

  4. 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.

  5. 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.

  6. 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

  7. 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???

Leave a Reply

Your email address will not be published. Required fields are marked *

*