SecurityController   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 7
Bugs 0 Features 2
Metric Value
wmc 7
c 7
b 0
f 2
lcom 0
cbo 3
dl 0
loc 39
rs 10

7 Methods

Rating   Name   Duplication   Size   Complexity  
A loginAction() 0 4 1
A acsAction() 0 4 1
A logoutAction() 0 4 1
A logoutReceiveAction() 0 4 1
A federationMetadataAction() 0 4 1
A discoveryAction() 0 4 1
A failureAction() 0 6 1
1
<?php
2
3
namespace AerialShip\SamlSPBundle\Controller;
4
5
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
6
use Symfony\Component\Security\Core\Exception\AuthenticationException;
7
use Symfony\Component\Security\Core\SecurityContextInterface;
8
9
class SecurityController extends Controller
10
{
11
    public function loginAction()
12
    {
13
        throw new \RuntimeException('You must configure the login path to be handled by the firewall using aerial_ship_saml_sp in your security firewall configuration.');
14
    }
15
16
    public function acsAction()
17
    {
18
        throw new \RuntimeException('You must configure the assertion consumer path path to be handled by the firewall using aerial_ship_saml_sp in your security firewall configuration.');
19
    }
20
21
    public function logoutAction()
22
    {
23
        throw new \RuntimeException('You must activate the logout in your security firewall configuration.');
24
    }
25
26
    public function logoutReceiveAction()
27
    {
28
        throw new \RuntimeException('You must configure the logout receive path path to be handled by the firewall using aerial_ship_saml_sp in your security firewall configuration.');
29
    }
30
31
    public function federationMetadataAction()
32
    {
33
        throw new \RuntimeException('You must configure the federation metadata path path to be handled by the firewall using aerial_ship_saml_sp in your security firewall configuration.');
34
    }
35
36
    public function discoveryAction()
37
    {
38
        throw new \RuntimeException('You must configure the discovery path path to be handled by the firewall using aerial_ship_saml_sp in your security firewall configuration.');
39
    }
40
41
    public function failureAction()
42
    {
43
        /** @var $error AuthenticationException */
44
        $error = $this->getRequest()->getSession()->get(SecurityContextInterface::AUTHENTICATION_ERROR);
0 ignored issues
show
Deprecated Code introduced by
The method Symfony\Bundle\Framework...ontroller::getRequest() has been deprecated with message: since version 2.4, to be removed in 3.0. Ask Symfony to inject the Request object into your controller method instead by type hinting it in the method's signature.

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
45
        return $this->render('AerialShipSamlSPBundle::failure.html.twig', array('error'=>$error));
46
    }
47
}
48