Listener/AuthenticationLoggerListener.php
protected function createAuthLog()
    {
        $request = $this->requestStack->getCurrentRequest();

        /** @var XM\SecurityBundle\Entity\AuthLog $authLog */
        $authLog = new $this->authLogClass();
        $authLog->setDatetime(new \DateTimeImmutable());
        $authLog->setUserAgent($request->headers->get('User-Agent'));
        $authLog->setIpAddress($request->getClientIp());

        return $authLog;
    }
protected function createAuthLog()
    {
        $request = $this->requestStack->getCurrentRequest();

        /** @var XM\SecurityBundle\Entity\AuthLog $authLog */
        $authLog = new $this->authLogClass();
        $authLog->setDatetime(new \DateTimeImmutable());
        $authLog->setUserAgent($request->headers->get('User-Agent'));
        $authLog->setIpAddress($request->getClientIp());

        return $authLog;
    }
protected function createAuthLog ( ) { $ request = $ this -> requestStack -> getCurrentRequest ( ) ; /** @var XM\SecurityBundle\Entity\AuthLog $authLog */ $ authLog = new $ this -> authLogClass ( ) ; $ authLog -> setDatetime ( new \ DateTimeImmutable ( ) ) ; $ authLog -> setUserAgent ( $ request -> headers -> get ( 'User-Agent' ) ) ; $ authLog -> setIpAddress ( $ request -> getClientIp ( ) ) ; return $ authLog ; }
Creates the auth log entity with the User Agent and client IP.

@return AuthLog
Creates the auth log entity with the User Agent and client IP .