1

I have to continue on an already existing CodeIgniter 3 application (not written by me) which contains multiple applications for different customers, the project structure looks a little like this:

  • root/
    • applications/
      • customer1/
        • config/, controllers/, models/, views/, ...
        • third_party/
          • SimpleSAMLphp/
            • config/, metadata/, www/, ...
            • lib/
              • _autoload.php
      • customer2/
      • ...
    • assets/, bundle/, ...
    • customers/
      • customer1/
        • assets/, index.php, ...
      • customer2/
      • ...
    • system/
    • vendor/
    • composer/
    • autoload.php

Now for one of the applications I have to replace the ion_auth system with an SSO (setup as a Service Provider from their IdP metadata). I googled a lot and tought SimpleSAMLphp would be my best option.

But I am really struggling just even putting the SimpleSAMLphp SP API into my application and the documentation isn't great.

-I "include_once" the third_party/SimpleSAMLphp/lib/_autoload.php file in the customers/customer1/index.php file (before require_once BASEPATH...) -I modified third_party/SimpleSAMLphp/lib/_autoload.php so it finds the vendor/autoload.php file

I expect to be able to use the methods of the SimpleSAMLphp library but instead I get the following errors:

-If I follow the code in this guide: Fatal error: Call to undefined function SimpleSAML\Auth\Simple()

-If use include APPPATH . 'third_party\SimpleSAMLphp\www\index.php in my controller just above the code from above tutorial: Fatal error: Class 'SimpleSAML\Error\Assertion' not found in

What am I doing wrong in my setup?

Rikj000
  • 27
  • 5

0 Answers0