/** * Validate the provided ticket with the CAS server and return a populated ValidationResponse object. * * @param string $ticket * @param string $service * * @throws ValidationException * * @return \Pucs\CasAuthBundle\Cas\CasLoginData */ public function validate($ticket, $service) { if (empty($ticket)) { throw new ValidationException("Missing service ticket needed for validation."); } if (empty($service)) { throw new ValidationException("Missing service path needed for validation."); } $validationUrl = $this->protocol->getValidationUri($service, $ticket); $response = $this->validationRequest->sendValidationRequest($validationUrl); return $this->validationParser->parseResponse($response); }
/** * {@inheritdoc} */ public function start(Request $request, AuthenticationException $authException = null) { return new RedirectResponse($this->protocol->getLoginUri($this->config['check_path'])); }