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
|
public function getClaims(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'id' => $this->personId,
|
'person_id' => $this->personId,
|
||||||
|
'address_id' => $this->addressId,
|
||||||
'email' => $this->communication->email,
|
'email' => $this->communication->email,
|
||||||
'roles' => $this->roles,
|
'roles' => $this->roles,
|
||||||
'profile' => [
|
'profile' => [
|
||||||
|
|||||||
@@ -30,7 +30,8 @@ class UserinfoController extends AbstractController
|
|||||||
|
|
||||||
// extend scopes depending on granted permissions
|
// extend scopes depending on granted permissions
|
||||||
if ($this->isGranted('ROLE_OAUTH2_ID')) {
|
if ($this->isGranted('ROLE_OAUTH2_ID')) {
|
||||||
$scopes[] = 'id';
|
$scopes[] = 'person_id';
|
||||||
|
$scopes[] = 'address_id';
|
||||||
}
|
}
|
||||||
if ($this->isGranted('ROLE_OAUTH2_PROFILE')) {
|
if ($this->isGranted('ROLE_OAUTH2_PROFILE')) {
|
||||||
$scopes[] = 'profile';
|
$scopes[] = 'profile';
|
||||||
|
|||||||
Reference in New Issue
Block a user