public function actionCheck($key) { $token = $this->accessTokenManager->getByKey($key); $status = "ERROR"; if ($token->isOk()) { $status = "OK"; $this->accessTokenManager->deactivate($key); } $this->sendResponse(new JsonResponse(['status' => $status])); }
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(); }