-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
NEW #22740 Add OpenID Connect impl #22741
Conversation
@jeritiana Thank you for this contribution, but on the other hand when do you check the existence of the user in Dolibarr? |
@hregis I don't check the existence of the user inside this module (or at least I didn't think I had to) because it is already handled somewhere else downstream. From my understanding of the authentication documentation, the goal of the login modules is to check the validity of a couple user/password. In the case of OpenID, this is delegated to the OpenID Identity Provider.
|
@jeritiana yes but you don't check the existence of the user in Dolibarr ! |
@jeritiana you can check the existing openid login method /~https://github.com/Dolibarr/dolibarr/blob/develop/htdocs/core/login/functions_openid.php |
@hregis Okay I see what you mean. Isn't this already the purpose of main.inc.php#L869, leading to "User not found, connexion refused" and Or should we also add this check inside an authentication module? |
@jeritiana in my opinion it is better to check if the user exists and is "active" before querying OpenID. In addition it will be necessary to add compatibility with Multicompany, this I can take care of. |
@jeritiana and why not have improved the OpenID login method already existing in Dolibarr? |
Sure enough, let's try that. I will let you know of any progression. Thanks for taking care of the Multicompany compatibility.
Because the already existing login method is fully featured for OpenID 2.0. Modifying would be a breaking change for Dolibarr and there would be impacts on users, compared to adding a new next gen OpenID Connect support. |
Line 49 there is an error I think : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check if the user exists as in the original openid method
Hi @jeritiana |
Hi @FlorentPoinsaut , I will have a look and integrate the suggested changes. Thanks for the ping! |
Co-authored-by: Florent Poinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
Co-authored-by: Florent Poinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
Co-authored-by: Florent Poinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
Co-authored-by: Florent Poinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
Co-authored-by: Florent Poinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
Co-authored-by: Florent Poinsaut <1256948+FlorentPoinsaut@users.noreply.github.com>
Hi, |
Thanks @jeritiana |
See context, use case and implementation details in #22740