EventListener/AuthTokenUpdaterListener.php
private function assertUserIsLoggedIn()
    {
        $token = $this->securityContext->getToken();

        $isAuthenticated = $token !== null &&
                           $token->isAuthenticated() && 
                           $token->getUser() instanceof User &&
                           $token->getUser()->isCredentialsNonExpired();

        if(!$isAuthenticated){
            throw new AccessDeniedException();
        }
    }
private function assertUserIsLoggedIn()
    {
        $token = $this->securityContext->getToken();

        $isAuthenticated = $token !== null &&
                           $token->isAuthenticated() && 
                           $token->getUser() instanceof User &&
                           $token->getUser()->isCredentialsNonExpired();

        if(!$isAuthenticated){
            throw new AccessDeniedException();
        }
    }
private function assertUserIsLoggedIn ( ) { $ token = $ this -> securityContext -> getToken ( ) ; $ isAuthenticated = $ token !== null && $ token -> isAuthenticated ( ) && $ token -> getUser ( ) instanceof User && $ token -> getUser ( ) -> isCredentialsNonExpired ( ) ; if ( ! $ isAuthenticated ) { throw new AccessDeniedException ( ) ; } }
Asserts that a user is logged in
Asserts that a user is logged in