Skip to content

Commit

Permalink
[VOX] add redirect_uri to cadre access url (#10862)
Browse files Browse the repository at this point in the history
  • Loading branch information
ottaviano authored Oct 11, 2024
1 parent 5405fa4 commit 3fe415a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Normalizer/JecouteAdherentNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public function normalize($object, $format = null, array $context = [])
];

if ($data['cadre_access'] = $this->authorizationChecker->isGranted(DataCornerVoter::DATA_CORNER, $object)) {
$data['cadre_auth_path'] = '/oauth/v2/auth?scope='.Scope::JEMENGAGE_ADMIN.'&response_type=code&client_id='.$this->clientRepository->findOneBy(['code' => AppCodeEnum::JEMENGAGE_WEB])->getUuid();
$client = $this->clientRepository->getCadreClient();
$data['cadre_auth_path'] = '/oauth/v2/auth?scope='.Scope::JEMENGAGE_ADMIN.'&response_type=code&client_id='.$client->getUuid().'&redirect_uri='.urlencode($client->getRedirectUris()[0]);
}

return $data;
Expand Down

0 comments on commit 3fe415a

Please sign in to comment.