X-Git-Url: https://git.rapsys.eu/userbundle/blobdiff_plain/6699a79d7f3e958907a0f580e4685b95be79296c..c087e23226ca50473259a07cebe0d49cb24eee5a:/Handler/AuthenticationSuccessHandler.php?ds=sidebyside diff --git a/Handler/AuthenticationSuccessHandler.php b/Handler/AuthenticationSuccessHandler.php index 579c110..c57c68a 100644 --- a/Handler/AuthenticationSuccessHandler.php +++ b/Handler/AuthenticationSuccessHandler.php @@ -37,41 +37,28 @@ class AuthenticationSuccessHandler extends DefaultAuthenticationSuccessHandler { /** * Default options */ - protected array $defaultOptions = [ - 'always_use_default_target_path' => false, - 'default_target_path' => '/', - 'login_path' => '/login', - 'target_path_parameter' => '_target_path', - 'use_referer' => false, - ]; - - /** - * Options - */ - protected array $options; - - /** - * Router instance - */ - protected RouterInterface $router; + protected array $defaultOptions = [ + 'always_use_default_target_path' => false, + 'default_target_path' => '/', + 'login_path' => '/login', + 'target_path_parameter' => '_target_path', + 'use_referer' => false, + ]; /** * {@inheritdoc} */ - public function __construct(RouterInterface $router, array $options = []) { - //Set router - $this->router = $router; - + public function __construct(protected RouterInterface $router, protected array $options = []) { //Set options $this->setOptions($options); } - /** + /** + * {@inheritdoc} + * * This is called when an interactive authentication attempt succeeds * * In use_referer case it will handle correctly when login_path is a route name or path - * - * {@inheritdoc} */ public function onAuthenticationSuccess(Request $request, TokenInterface $token): Response { //Set login route