This topic contains 2 replies, has 2 voices, and was last updated by Rodolfo 9 years, 2 months ago.
- Topic
Hi Oro Friends,
I’m trying to intercept the authentication process to add a 3rd value (Google Two-Factor-Auth). My problem is that I can’t find what exactly method are validating the username/password.
1) So, let’s take a look in the form:
123<form action=”{{ path(‘oro_user_security_check’) }}” method=”post” class=”form-signin”>2) Let’s find the router:
1234app/console router:debug | grep ‘oro_user_security_check’oro_user_security_check ANY ANY ANY /user/login-check3) This is the controller that are using the ‘oro_user_security_check’ router:
123456789101112/*** @Route("/login-check", name="oro_user_security_check")*/public function checkAction(){throw new \RuntimeException('You must configure the check path to be handled by the firewall ' .'using form_login in your security firewall configuration.');}4) If we have an empty method, I believe that we have an Event Listener somewhere taking care of this authentication. Where is it living? I only found this one, but this is after the authentication. I can add my code here and destroy the session after that, but I don’t think this is the right way. So, can you guys please give me a clue about how oro authentication works?
123456789101112public function onLogin(InteractiveLoginEvent $event){$user = $event->getAuthenticationToken()->getUser();if ($user instanceof User) {$user->setLastLogin(new \DateTime('now', new \DateTimeZone('UTC')))->setLoginCount($user->getLoginCount() + 1);$this->userManager->updateUser($user);}}}Thanks!!
The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.