]> Raphaƫl G. Git Repositories - userbundle/blobdiff - Handler/AuthenticationSuccessHandler.php
Remove guestid and guestgroup in favour of more reliable defaultgroup
[userbundle] / Handler / AuthenticationSuccessHandler.php
index 579c11029151c8e53436e408e60d318db54f0cd9..c57c68a03f9fa19c890504af6d199d7f8261422e 100644 (file)
@@ -37,41 +37,28 @@ class AuthenticationSuccessHandler extends DefaultAuthenticationSuccessHandler {
        /**
         * Default options
         */
        /**
         * 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}
         */
 
        /**
         * {@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);
        }
 
                //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
         * 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
         */
        public function onAuthenticationSuccess(Request $request, TokenInterface $token): Response {
                //Set login route