Exemple #1
0
 public function actionGo($application_id)
 {
     $user_id = $this->getUser()->getId();
     if ($this->applicationManager->isAllow($user_id, $application_id)) {
         $token = $this->accessTokenManager->generate($user_id);
         $application = $this->applicationManager->getApplicationById($application_id);
         $this->redirectUrl($application->getScudURL() . $token->getKey());
     }
     throw new BadRequestException();
 }
Exemple #2
0
 public function actionGetAllApplications()
 {
     $response = [];
     $apps = $this->applicationManager->getAllApplications();
     foreach ($apps as $app) {
         /** @var Application $app */
         $response[] = ['name' => $app->getName(), 'url' => $app->getScudURL()];
     }
     $this->sendResponse(new JsonResponse($response));
 }