feat: expose person_id and address_id as separate userinfo claims
This commit is contained in:
@@ -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' => [
|
||||
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user