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.
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
LikeLike
Problem solved,
went into CAS.php and changed the Client() function’s last argument to FALSE.
LikeLike
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.
LikeLike
could also work for vtiger ? ๐
LikeLike
btw .. looks like sugar 6.2 is going to have some great improvements ๐
LikeLike
Where can I get a copy of “CASAuthenticate” the link is now dead?
Thanks
LikeLike
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.
LikeLike
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.
LikeLike
Thanks for fixing the link! I’ll let you know how it goes.
LikeLike
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
LikeLike
Thanks I’ll update the post to direct to your github page.
LikeLike
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???
LikeLike