Configuration problem yii2-usuario-ldap

I want to run ldap. I use yii2-usuario. I have installed yetopen/yii2-usuario-ldap or dmstr / yii2-usuario-ldap-extension
The module initialization function is working. but it most likely doesn’t work

Event::on(SecurityController::class, FormEvent::EVENT_BEFORE_LOGIN, function (FormEvent $event)

When I log in to the application, the normal login process follows

What could be the reason why the event did not work?