edgardmessias / glpi-singlesignon

GNU General Public License v3.0
68 stars 51 forks source link

PHP 8.1 compatibility #52

Open Knezzen opened 1 year ago

Knezzen commented 1 year ago

Hi!

Using the latest git version of SSO and GLPI 10.0.6 on Ubuntu 22.04, Apache2 and PHP 8.1 gives me the following error when I'm on the SSO settings page and have debug mode active in GLPI:

PHP Deprecated function (8192): str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /var/www/html/plugins/singlesignon/inc/provider.class.php at line 870
PHP Deprecated function (8192): hash_hmac(): Passing null to parameter #2 ($data) of type string is deprecated in /var/www/html/plugins/singlesignon/inc/provider.class.php at line 871

I have an issue with connecting to Azure and O365, but this incompatibility might have something to do with it. The SSO error I'm getting is:

 [error] => Array
        (
            [code] => InvalidAuthenticationToken
            [message] => Access token validation failure. Invalid audience.
            [innerError] => Array
                (