X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FPlugin%2FAuthentication%2FStore%2FHtpasswd%2FUser.pm;h=ad5d17cc249681256267cf2782a268d203d06921;hb=9f2d86693e9a3e35a9d628a1dae0903f149ee7de;hp=42582d6428c954f5637925c9e33c7e37a34a2472;hpb=cedb9fb4ae54e24ead346e95e1a9f574ea543eb8;p=catagits%2FCatalyst-Authentication-Store-Htpasswd.git diff --git a/lib/Catalyst/Plugin/Authentication/Store/Htpasswd/User.pm b/lib/Catalyst/Plugin/Authentication/Store/Htpasswd/User.pm index 42582d6..ad5d17c 100644 --- a/lib/Catalyst/Plugin/Authentication/Store/Htpasswd/User.pm +++ b/lib/Catalyst/Plugin/Authentication/Store/Htpasswd/User.pm @@ -13,6 +13,8 @@ use overload '""' => sub { shift->id }, fallback => 1; sub new { my ( $class, $store, $user ) = @_; + return unless $user; + bless { store => $store, user => $user }, $class; } @@ -26,7 +28,8 @@ sub supported_features { password => { self_check => 1, }, - session => 1 + session => 1, + roles => 1, }; } @@ -95,7 +98,7 @@ Returns whether the password is valid. Returns an array of roles, which is extracted from a comma-separated list in the third field of the htpasswd file. -=head1 COPYRIGHT & LICNESE +=head1 COPYRIGHT & LICENSE Copyright (c) 2005 the aforementioned authors. All rights reserved. This program is free software; you can redistribute