On Mon, May 7, 2012 at 11:43 PM, Matt Simerson <m...@tnpi.net> wrote:
> These 3 auth plugins all have a data store they fetch the reference > password or hash from. They then match the attemped password or hash > against the reference. This consolidates the latter portion (validating > the password/hash) into Plugin.pm. > Pros: less duplicated code in the plugins. > Pass validation consistently handled for these 3 plugins. > less work to create new auth plugins > > Thanks this is a nice cleanup. I don't think this belongs directly in Plugin.pm. It's somewhat specific, and not apropos to most plugins. It only needs $self for logging. What about Plugin/AuthHelpers.pm or just Plugin/Helpers.pm. > Cons: adds a 'use MD5' in Plugin.pm > ??? > Not a big deal as far as required modules go. > > +use strict; > +use warnings; > + > +use base 'Qpsmtpd::Plugin'; > +use Qpsmtpd::Constants; > + > All of these except for use warnings come for free with any plugin. They're not required here.