Barebones CMS

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] sso_client->LoggedIn() always returns FALSE
Hey there!

I'm integrating Barebones SSO in a CodeIgniter system.

When login window is presented (and it's sent) the session is generated (I saw it in the SSO server), but the client function LoggedIn() always returns FALSE.

I was reading the code, I've found the script returns FALSE in line 505 of file sso/client/support/sso_functions.php:

PHP Code:
502    public function LoggedIn()
503    {
504        if (isset($this->user_info))  return ($this->user_info["sso_id"] != "");
505        if (!isset($this->request[SSO_COOKIE_NAME "_s"]))  return false;
// Decrypt the cookie.
508        $this->user_info = array("sso_id" => "");

Any suggestions?

Thanks in advance, Abel.


I've added a file_put_contents of serialize($this->request) and SSO_COOKIE_NAME, and this is the output:

Request: a:4:{s:8:"sso_cm_c";s:1:"1";s:8:"sso_cm_v";s:27:"9tKdwlaE-H74IHbr7mevocVghUI";s:8:"sso_cm_s";s:203:"jOCO_M7visGrauli-m3zJE9raVlqQFze6Wk6Mlwuk0TWOj_VzxrxMEovrFi-6MjelFjTLreOfW-J0-YuoCcZ8AH0g0A94EkATy0nIC1xhH8nSG5qbwFAvPahx341IZugBCyrCUgTEjMwU98jOVv32yKOYlfnTEMqHjNJvDN8YSqzVxkceSwl7qeu8X26Sq-IH8buujCr56k";s:10:"ci_session";s:40:"77515c92eb614205c30e4d3ac8dcd22a9a37fe62";}
Request: a:1:{s:10:"ci_session";s:40:"77515c92eb614205c30e4d3ac8dcd22a9a37fe62";}

Yes, is printed twice.


Solved! My mistake. Thanks anyway.
Hi Abel,

Do you mind sharing details about integrating CI and Barebones SSO? I am a newbie in both. So far I haven't even figured out in which CI directory SSO should be installed...

Any help would be appreciated since I am totally floundering...

Thank you!
I'm the author of the SSO server/client software.

The SSO client is product-agnostic. However, for full functionality, the client should be loaded as early as possible in your code. I don't see why it would have to go into any specific directory. Quickly glancing at the directory structure for CodeIgniter 3.1.6, it could be put in 'application/helpers' or 'application/third_party', but, as I said, the directory you put it in doesn't really matter. It could be in the root of the website for all the SSO client cares. Now, CI might care, but I seriously doubt it can block loading an absolute path specified by a 'require_once' line.

I don't get why anyone would ever lock themselves into the MVC model for web application development. There's nothing wrong with writing PHP without using a framework. I do it all the time with Admin Pack and Flex Forms, which are tools - not frameworks that my application has to adhere to.

Author of Barebones CMS

If you found my reply to be helpful, be sure to donate!
All funding goes toward future product development.

Forum Jump:

Users browsing this thread: 2 Guest(s)