feat: expose person_id and address_id as separate userinfo claims

This commit is contained in:
Björn Fromme
2026-08-12 17:47:29 +02:00
parent 7ebd2dad1a
commit aa486a4931
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -137,7 +137,8 @@ class PersonalData
public function getClaims(): array
{
return [
'id' => $this->personId,
'person_id' => $this->personId,
'address_id' => $this->addressId,
'email' => $this->communication->email,
'roles' => $this->roles,
'profile' => [
+2 -1
View File
@@ -30,7 +30,8 @@ class UserinfoController extends AbstractController
// extend scopes depending on granted permissions
if ($this->isGranted('ROLE_OAUTH2_ID')) {
$scopes[] = 'id';
$scopes[] = 'person_id';
$scopes[] = 'address_id';
}
if ($this->isGranted('ROLE_OAUTH2_PROFILE')) {
$scopes[] = 'profile';