public function beginAuthentication(AuthenticationContextInterface $context): bool
    {
        $user = $context->getUser();

        if (!$user instanceof User) {
            return false;
        }

        return (bool) $user->useTwoFactor;
    }
public function beginAuthentication(AuthenticationContextInterface $context): bool
    {
        $user = $context->getUser();

        if (!$user instanceof User) {
            return false;
        }

        return (bool) $user->useTwoFactor;
    }
public function beginAuthentication ( AuthenticationContextInterface $ context ) : bool { $ user = $ context -> getUser ( ) ; if ( ! $ user instanceof User ) { return false ; } return ( bool ) $ user -> useTwoFactor ; }
{@inheritdoc}
{