-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
feat(oauth2): simple userinfo endpoint #43684
base: master
Are you sure you want to change the base?
Conversation
e7d19eb
to
f5b90e2
Compare
@skjnldsv Is there anything else I can add to help you accept this? |
@skjnldsv This adds the user_info endpoint, but does not add the discovery. |
Signed-off-by: d.kudrinskiy <hardviper@icloud.com>
6b373db
to
d934c98
Compare
There was an issue with the rebase, please fix it |
Signed-off-by: d.kudrinskiy <hardviper@icloud.com>
Signed-off-by: d.kudrinskiy <hardviper@icloud.com>
d934c98
to
21a1825
Compare
@skjnldsv Ready! I have corrected! I don't understand how these commits got here. |
Signed-off-by: d.kudrinskiy <hardviper@icloud.com>
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.
I'm fine with the endpoint. Some instructions for testing would be appreciated.
The name split logic probably doesn't work for all names. If we can I would strongly favor removing it and only exposing the full name.
Co-authored-by: Christoph Wurst <ChristophWurst@users.noreply.github.com> Signed-off-by: Danila <57199291+hardviper@users.noreply.github.com>
Co-authored-by: Christoph Wurst <ChristophWurst@users.noreply.github.com> Signed-off-by: Danila <57199291+hardviper@users.noreply.github.com>
Co-authored-by: Christoph Wurst <ChristophWurst@users.noreply.github.com> Signed-off-by: Danila <57199291+hardviper@users.noreply.github.com>
Co-authored-by: Christoph Wurst <ChristophWurst@users.noreply.github.com> Signed-off-by: Danila <57199291+hardviper@users.noreply.github.com>
Co-authored-by: Christoph Wurst <ChristophWurst@users.noreply.github.com> Signed-off-by: Danila <57199291+hardviper@users.noreply.github.com>
Signed-off-by: d.kudrinskiy <hardviper@icloud.com>
Thanks for your pull request 👍 I'm against the process_name feature even as optional. Once merged, we have to maintain and support it. Furthermore, we cannot just drop the feature when people started using it and rely on it. But the approach is just wrong, and a similar approach in CardDAV (Converter.splitFullName) already caused trouble. |
@kesselb Thank you for your time and feedback on my pull request! |
@julien-nc @kesselb @ChristophWurst @skjnldsv I suggest we return to the discussion of PR. Is there anything else I can do to convince you to accept my contribution? |
The approach to split the full name by a given character assumes that every name follows the same pattern. Please look at https://en.wikipedia.org/wiki/Personal_name to get a better understanding how different personal names are. To solve this problem, we need our own fields to store first name/last name and make the full name a getter from them. I assume you can still implement this endpoint via your own Nextcloud app. |
@kesselb Is there an addition of last name and first name fields in the roadmap? |
Forwarded your question. |
@kesselb Do you have an answer for the roadmap? |
Having fields for first name, last name, title or prefix as addition/replacement for the full name field is something we want. However, it's not scheduled for the current or next iteration. https://github.com/H2CK/oidc could be interesting for you as well. |
Summary
This solves the oAuth2 authorization issue in openproject when openproject is the client.
Added endpoint that returns a minimum set of user information.
This is very necessary in my openproject integration with nextcloud.
I hope this helps someone else.
Thanks to @jlallana for suggesting this solution in PR #19934.
Checklist
\OCA\OAuth2\Tests\Controller\OauthApiControllerTest