feat: identify accounts by a uuid in the oauth2 sub claim

This commit is contained in:
2026-09-23 15:17:09 +02:00
parent cc3d32fcbb
commit bad916cfb7
6 changed files with 153 additions and 7 deletions
+5 -1
View File
@@ -58,7 +58,11 @@ class UserinfoController extends AbstractController
// addresses on a person's record as a login and answers all of them with the same
// ids and the same first contact address, so only the local account tells the staff
// account and the private one apart — and they hold different roles.
$data->subject = (string) $user->getId();
//
// The uuid, not the primary key: consumers store this value and match their own
// accounts on it, so it must not disclose how many accounts exist or let one
// account's identifier be guessed from another's.
$data->subject = $user->getUuid();
$data->loginEmail = $user->getEmail();
// Patch current user's roles. The implicit ROLE_USER says nothing about the