10000 starTAuthentication · symfony/symfony@a96aecb · GitHub
[go: up one dir, main page]

Skip to content

Commit a96aecb

Browse files
committed
starTAuthentication
1 parent 30157de commit a96aecb

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/Symfony/Component/Security/Http/Authorization/NotFullFledgedEqualNormalLoginHandler.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@
2929
*/
3030
class NotFullFledgedEqualNormalLoginHandler implements NotFullFledgedHandlerInterface
3131
{
32-
public function handle(ExceptionEvent $event, AccessDeniedException $exception, AuthenticationTrustResolverInterface $trustResolver, ?TokenInterface $token, ?LoggerInterface $logger, callable $starAuthenticationCallback): bool
32+
public function handle(ExceptionEvent $event, AccessDeniedException $exception, AuthenticationTrustResolverInterface $trustResolver, ?TokenInterface $token, ?LoggerInterface $logger, callable $startAuthenticationCallback): bool
3333
{
3434
if (!$trustResolver->isAuthenticated($token)) {
35-
$this->reauthenticate($starAuthenticationCallback, $event, $token, $exception, $logger);
35+
$this->reauthenticate($startAuthenticationCallback, $event, $token, $exception, $logger);
3636
}
3737

3838
foreach ($exception->getAttributes() as $attribute) {
3939
if (\in_array($attribute, [AuthenticatedVoter::IS_AUTHENTICATED_FULLY])) {
40-
$this->reauthenticate($starAuthenticationCallback, $event, $token, $exception, $logger);
40+
$this->reauthenticate($startAuthenticationCallback, $event, $token, $exception, $logger);
4141

4242
return true;
4343
}
@@ -46,7 +46,7 @@ public function handle(ExceptionEvent $event, AccessDeniedException $exception,
4646
return false;
4747
}
4848

49-
private function reauthenticate(callable $starAuthenticationCallback, ExceptionEvent $event, ?TokenInterface $token, AccessDeniedException $exception, ?LoggerInterface $logger): void
49+
private function reauthenticate(callable $startAuthenticationCallback, ExceptionEvent $event, ?TokenInterface $token, AccessDeniedException $exception, ?LoggerInterface $logger): void
5050
{
5151
$logger?->debug('Access denied, the user is not fully authenticated; redirecting to authentication entry point.', ['exception' => $exception]);
5252

@@ -56,7 +56,7 @@ private function reauthenticate(callable $starAuthenticationCallback, ExceptionE
5656
$insufficientAuthenticationException->setToken($token);
5757
}
5858

59-
$event->setResponse($starAuthenticationCallback($event->getRequest(), $insufficientAuthenticationException));
59+
$event->setResponse($startAuthenticationCallback($event->getRequest(), $insufficientAuthenticationException));
6060
} catch (\Exception $e) {
6161
$event->setThrowable($e);
6262
}

src/Symfony/Component/Security/Http/Authorization/NotFullFledgedHandlerInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ interface NotFullFledgedHandlerInterface
3030
* This function can make checks and event / exception changes to change the Response
3131
* It returns a boolean for break or not after that or continue the ExceptionListener process to decorate Exception and their response.
3232
*
33-
* @param $starAuthenticationCallback callable for call start function from
33+
* @param $startAuthenticationCallback callable for call start function from
3434
*
3535
* @return bool break handleAccessDeniedException function in ExceptionListener after handle
3636
*/
37-
public function handle(ExceptionEvent $event, AccessDeniedException $exception, AuthenticationTrustResolverInterface $trustResolver, ?TokenInterface $token, ?LoggerInterface $logger, callable $starAuthenticationCallback): bool;
37+
public function handle(ExceptionEvent $event, AccessDeniedException $exception, AuthenticationTrustResolverInterface $trustResolver, ?TokenInterface $token, ?LoggerInterface $logger, callable $startAuthenticationCallback): bool;
3838
}

src/Symfony/Component/Security/Http/Authorization/NotFullFledgedRedirectToStartAuthenticationHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
*/
2828
class NotFullFledgedRedirectToStartAuthenticationHandler implements NotFullFledgedHandlerInterface
2929
{
30-
public function handle(ExceptionEvent $event, AccessDeniedException $exception, AuthenticationTrustResolverInterface $trustResolver, ?TokenInterface $token, ?LoggerInterface $logger, callable $starAuthenticationCallback): bool
30+
public function handle(ExceptionEvent $event, AccessDeniedException $exception, AuthenticationTrustResolverInterface $trustResolver, ?TokenInterface $token, ?LoggerInterface $logger, callable $startAuthenticationCallback): bool
3131
{
3232
if (!$trustResolver->isFullFledged($token)) {
3333
$logger?->debug('Access denied, the user is not fully authenticated; redirecting to authentication entry point.', ['exception' => $exception]);
@@ -38,7 +38,7 @@ public function handle(ExceptionEvent $event, AccessDeniedException $exception,
3838
$insufficientAuthenticationException->setToken($token);
3939
}
4040

41-
$event->setResponse($starAuthenticationCallback($event->getRequest(), $insufficientAuthenticationException));
41+
$event->setResponse($startAuthenticationCallback($event->getRequest(), $insufficientAuthenticationException));
4242
} catch (\Exception $e) {
4343
$event->setThrowable($e);
4444
}

0 commit comments

Comments
 (0)
0