Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | public function start(Request $request, AuthenticationException $authException = null) |
||
24 | { |
||
25 | if (!$this->shibbolethServiceProvider->isAuthenticated()) { |
||
26 | $this->log('Shibboleth has not authenticated your request.'); |
||
27 | throw new AuthenticationException('Shibboleth has not authenticated your request.'); |
||
28 | } |
||
29 | $url = $this->shibbolethServiceProvider->getLoginUrl($request->getUri()); |
||
30 | if (!$this->shibbolethServiceProvider->isReachable($url)) { |
||
31 | $this->log(sprintf('Shibboleth login is not available at "%s".', $url)); |
||
32 | throw new AuthenticationException('Shibboleth login is not available.'); |
||
33 | } |
||
34 | $this->log(sprintf('Redirecting to login at "%s"...', $url)); |
||
35 | return new RedirectResponse($url); |
||
36 | } |
||
37 | } |
||
38 |