@@ 66-79 (lines=14) @@ | ||
63 | * @param string $identityId |
|
64 | * @return \Symfony\Component\HttpFoundation\Response |
|
65 | */ |
|
66 | public function getRegistrationAuthorityCredentialsAction($identityId) |
|
67 | { |
|
68 | $this->denyAccessUnlessGranted(['ROLE_RA', 'ROLE_SS']); |
|
69 | ||
70 | $identityService = $this->getService(); |
|
71 | ||
72 | $credentials = $identityService->findRegistrationAuthorityCredentialsOf($identityId); |
|
73 | ||
74 | if (!$credentials) { |
|
75 | return new JsonNotFoundResponse(); |
|
76 | } |
|
77 | ||
78 | return new JsonResponse($credentials); |
|
79 | } |
|
80 | ||
81 | /** |
|
82 | * @return IdentityService |
@@ 32-43 (lines=12) @@ | ||
29 | * @param string $nameId injected by symfony from the request |
|
30 | * @return JsonNotFoundResponse|JsonResponse |
|
31 | */ |
|
32 | public function getAction($nameId) |
|
33 | { |
|
34 | $this->denyAccessUnlessGranted(['ROLE_RA']); |
|
35 | ||
36 | $sraa = $this->getService()->findByNameId(new NameId($nameId)); |
|
37 | ||
38 | if (!$sraa) { |
|
39 | return new JsonNotFoundResponse(); |
|
40 | } |
|
41 | ||
42 | return new JsonResponse($sraa); |
|
43 | } |
|
44 | ||
45 | /** |
|
46 | * @return \Surfnet\StepupMiddleware\ApiBundle\Identity\Service\SraaService |