1.005 2008-09-XX
- Added better description of the use of the domains and
use_uri_for options (info culled from RFC2617).
- -
+ - Split init method out to make this module easier to sub-class.
1.004 2008-09-12
- Add tests for use_uri_for configuration options.
$self->realm($realm);
+ $self->init;
+ return $self;
+}
+
+sub init {
+ my ($self) = @_;
my $type = $self->_config->{'type'} ||= 'any';
if (!grep /$type/, ('basic', 'digest', 'any')) {
Catalyst::Exception->throw(__PACKAGE__ . " used with unsupported authentication type: " . $type);
}
- return $self;
}
sub authenticate {
Simple constructor.
+=item init
+
+Validates that $config is ok.
+
=item authenticate $c, $realm, \%auth_info
Tries to authenticate the user, and if that fails calls