-
-
Notifications
You must be signed in to change notification settings - Fork 68
Migration GLPI 11 | 1.5.1 #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…-nouvelle-version-glpi Migrate plugin to GLPI 11 tooling
…n and uninstallation
…ntentForItem methods
…d toolbox files to check for existing classes before defining them
…ider, provider_user, and toolbox classes
Update namespace references and class aliasing for Singlesignon plugin
Remove unnecessary template path addition in LoginRenderer
Refactor LoginRenderer to handle auto redirect URL in injectPopupScri…
Add title parameter for Single Sign-on in LoginRenderer template rend…
Sanitize auto redirect URL in injectPopupScript method using htmlspec…
Refactor getCallbackUrl method to use root_doc for constructing the c…
fix: iframe sso connect
remove iframe, re use injectpopupscript
… lieu de /provider/ 2. `getCallbackParameters()` - Essaie d'abord $_GET, puis fallback vers PATH_INFO pour rétro-compatibilité
1. `getCallbackUrl()` - Génère maintenant une URL avec ?provider= …
fix: redirect provider
|
Hi @fgendorf thanks for your feedback, I'll check that tomorrow! |
update glpi button form
Ft/callbackurl
1.5.1 alpha
|
Hi @fgendorf I didn't have time to look for the Google error, but I fixed three bugs, including the add provider button. Here is the version that fixes that |
|
Hi, new version fix few bugs. https://github.com/aidalinfo/glpi-singlesignon/releases/tag/1.5.1-alpha-02 thx @shmsh9 |
|
@Killian-Aidalinfo the version https://github.com/aidalinfo/glpi-singlesignon/releases/tag/1.5.1-alpha-02 fix the authentication with google, it's working now |
|
It seems that option IsDefault: YES not have the same behavior in GLPI 10, that automatically try login in with the google session, with no necessity to click on the button |
Hi @fgendorf please try https://github.com/aidalinfo/glpi-singlesignon/releases/download/1.5.1-alpha-03/glpi-singlesignon-1.5.1-alpha-03.tar.bz2 I fixed that problem a few hours ago. |
|
Maybe miss something... |
I don't have these messages on my GLPI, but I'll see if I can reproduce them. Do you have multiple authentication providers configured? |
|
Hi, there are ldap authentication too |
|
Trying to login using SSO type = Generic -> Unexpected error On GLPI 10.0.12 and plugin version 1.3.4 everything working well In php-errors.log: |
Hi ! The problem is solved here: Auto login is forced when you log out, we don't have noAuto login. I'll look into that later, but you can test this version, auto login should work: https://github.com/aidalinfo/glpi-singlesignon/releases/download/1.5.1-alpha-04/glpi-singlesignon-1.5.1-alpha-04.tar.bz2 |
|
Hi @Sheykoe with alpha 03 ? |
|
@Sheykoe I ship you quickly an alpha 5 that should fix your problem |
Tried on alpha 03 and 04
It's awesome! Thank you! |
|
@Sheykoe please try https://github.com/aidalinfo/glpi-singlesignon/releases/download/1.5.1-alpha-05/glpi-singlesignon-1.5.1-alpha-05.tar.bz2 @fgendorf Fix auto login upon disconnection , no loop |
|
HI @Killian-Aidalinfo , great job, don't worry about multiples versions, thats the meaning of alpha! function plugin_singlesignon_post_init()
{
global $CFG_GLPI;
// If user logged in via SSO, redirect logout to plugin's logout to preserve noAUTO
if (isset($_SESSION['glpi_sso_login']) && $_SESSION['glpi_sso_login']) {
$plugin_logout = Plugin::getWebDir('singlesignon') . '/front/logout.php';
echo "<script type='text/javascript'>
document.addEventListener('DOMContentLoaded', function() {
// Modify all logout links to use plugin logout
document.querySelectorAll('a[href*=\"/front/logout.php\"]').forEach(function(link) {
var href = link.getAttribute('href');
if (href && href.indexOf('plugins/singlesignon') === -1) {
link.setAttribute('href', '{$plugin_logout}');
}
});
});
</script>";
}
}Thanks for your time! |
GLPI 11.0.1 clean installation - only default users (glpi, normal, post-only and others) I tried alpha-06: now after choosing SSO provider on GLPI login page it redirects me to my SSO provider page, I'm passing authorization on it and it redirects me back to GLPI. In GLPI I receive "Unexpected error" and no user was created in GLPI from SSO provider. Errors in php-errors.log |
|
@fgendorf yup and no profil picture :( @fgendorf & @Sheykoe please try : |
Did your user not have a first or last name? Try the new version; this error should no longer appear. |
|
@Killian-Aidalinfo I tried the alpha 07 in my environment (GLPI 11 upgraded from 10), and got "The action you have requested is not allowed.". Full log: My user have first and last name. |
Everything working now on my environment, if I can help in some test, just ask. |
|
I've tried the alpha-07 version, and everything seems to be working well! Authorization is successful (using Generic SSO), and new users are created correctly. I'm going to test it on my server next. Thank you for your work! If you need any help with testing, just let me know. P.S.: There's a known issue in the plugin – after authorization, it only redirects to the main page instead of the originally requested URL. Is it possible to fix this? Example: I'm not logged into GLPI. I try to open a specific page, e.g., http://glpi-address/front/ticket.php. The authorization page opens. I complete the authorization. Instead of being redirected to the page from step 2 (http://glpi-address/front/ticket.php), I'm redirected to the main page (http://glpi-address/Helpdesk). |


Refactors the Single Sign-On plugin to target GLPI 11 and PHP 8.2 while modernising its tooling and runtime flow.
provider.class.php:1, src/Provider.php:1, src/Preference.php:1).
(src/LoginRenderer.php:10, templates/login/buttons.html.twig:1, css/login.css:1).
authorization roundtrip (front/callback.php:1, src/Toolbox.php:18, front/picture.send.php:1).