Passed
Pull Request — main (#308)
by Paul
16:16 queued 09:55
created

AuthenticationSuccessHandler   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 3
c 2
b 0
f 0
dl 0
loc 14
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A onAuthenticationSuccess() 0 6 1
1
<?php
2
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
declare(strict_types = 1);
4
5
namespace Surfnet\StepupSelfService\SelfServiceBundle\Security\Authentication\Handler;
6
7
use Surfnet\SamlBundle\Security\Authentication\Handler\SuccessHandler;
8
use Surfnet\StepupSelfService\SelfServiceBundle\Security\Authentication\AuthenticatedSessionStateHandler;
9
use Symfony\Component\HttpFoundation\RedirectResponse;
10
use Symfony\Component\HttpFoundation\Request;
11
use Symfony\Component\HttpFoundation\Response;
12
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
13
14
class AuthenticationSuccessHandler extends SuccessHandler
0 ignored issues
show
Coding Style introduced by
Missing doc comment for class AuthenticationSuccessHandler
Loading history...
15
{
16
17
    public function __construct(
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function __construct()
Loading history...
18
        private AuthenticatedSessionStateHandler $authenticatedSessionStateHandler,
19
    ) {
20
    }
21
22
    public function onAuthenticationSuccess(Request $request, TokenInterface $token): ?Response
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function onAuthenticationSuccess()
Loading history...
23
    {
24
        $this->authenticatedSessionStateHandler->setCurrentRequestUri($request->getUri());
25
26
        // @TODO Paul, denk dat je hier naar de /overview of / route moet gaan
27
        return new RedirectResponse('/overview');
28
    }
29
}
30