Easy Digital Downloads is an incredibly popular plugin that allows you to create a digital product store using WordPress.
You can require users to be logged in to checkout in EDD, but that does not restrict a download link from being used when the user is not logged in. Restrictions can be put on the link in terms of number of times it can be downloaded and disable redownload, but that can lead to a poor user experience – being over protective can create problems for legitimate users while protecting what amounts to a “perceived” risk rather than real.
But you can integrate with WP-Members to force a user to be logged in to actually download the file. This way, even if the link is known and not expired, the user will be redirected to login if they attempt to download without being logged in.