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

AuthenticationSuccessHandler::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 0
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
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