With the release of OS X El Capitan later this year, Apple will bring a setting that has been part of iOS for some time over to the Mac. The setting allows users to determine whether they want to enter their password every time they download a paid app or in-app purchase, or if they would rather only have to enter it once for a given 15-minute window.
A second setting will also allow users to permanently save their password for free downloads, ensuring that you never have to login to download another free app. Of course, both of these settings can be configured to require your password every time.
Apple announced OS X El Capitan earlier today alongside iOS 9.