mirror of
https://github.com/photoprism/photoprism.git
synced 2026-03-02 22:57:18 -05:00
Auth: Add userinfo API endpoint to get information about the logged in user #2134
Labels
No labels
ai
android
api
auth
awesome
bug
bug
ci
cli
config
database
declined
deprecated
docker
docs 📚
documents
duplicate
easy
enhancement
enhancement
enhancement
epic
faces
feedback wanted
frontend
hacktoberfest
help wanted
idea
in-progress
incomplete
index
invalid
ios
labels
live
live
low-priority
macos
member-feature
metadata
mobile
nas
needs-analysis
no-coding-required
no-coding-required
observability
performance
places
please-test
plus-feature
priority
pro-feature
question
raspberry-pi
raw
released
released
released
research
resolved
security
sharing
tested
tests
third-party-issue
thumbnails
upgrade
upstream-issue
ux
vector
video
waiting
won't fix
won't fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/photoprism#2134
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lastzero on GitHub (Jul 3, 2024).
Performing an authenticated request to
GET /api/v1/oauth/userinfoshould return information about the logged in user:(1) Since we are using the (OpenID Foundation certified)
github.com/zitadel/oidclibrary for the recently released OIDC client implementation, theauthorizeanduserinfoAPI endpoints should also be based on it (as much as possible):github.com/zitadel/oidc@7b8be4387a/pkg/op/userinfo.go (L26-L48)(2) Based on this (a) allowing authentication and authorization with our own auth/session tokens (so existing clients can use the endpoint) and (b) setting the Userinfo values from the User entity seems to be pretty much all that is needed.
(3) In addition, all pull requests should include unit tests - at least for the core functionality - to ensure that the changes work as expected: https://docs.photoprism.app/developer-guide/pull-requests/#acceptance-criteria
Documentation:
Protocol References:
Related Issues:
@andiz2 commented on GitHub (Jul 13, 2024):
Hi friends! I can take care of this endpoint too :).
Would be so much fun.
@lastzero commented on GitHub (Jul 13, 2024):
@andiz2 Awesome, thank you very much! I've updated the issue description and added the most important acceptance criteria as well as links to the code and library we're using. I'll be happy to help if you have any questions or would like to join our contributors chat.