[Catalyst-commits] r8419 - in
Catalyst-Authentication-Credential-HTTP/1.000/trunk: .
lib/Catalyst/Authentication/Credential t
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Sun Sep 14 20:35:32 BST 2008
Author: t0m
Date: 2008-09-14 20:35:31 +0100 (Sun, 14 Sep 2008)
New Revision: 8419
Modified:
Catalyst-Authentication-Credential-HTTP/1.000/trunk/Changes
Catalyst-Authentication-Credential-HTTP/1.000/trunk/lib/Catalyst/Authentication/Credential/HTTP.pm
Catalyst-Authentication-Credential-HTTP/1.000/trunk/t/04pod_spelling.t
Log:
Fix spelling test, split init method out of constructor for easier sub-classing
Modified: Catalyst-Authentication-Credential-HTTP/1.000/trunk/Changes
===================================================================
--- Catalyst-Authentication-Credential-HTTP/1.000/trunk/Changes 2008-09-14 14:27:46 UTC (rev 8418)
+++ Catalyst-Authentication-Credential-HTTP/1.000/trunk/Changes 2008-09-14 19:35:31 UTC (rev 8419)
@@ -1,7 +1,7 @@
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.
Modified: Catalyst-Authentication-Credential-HTTP/1.000/trunk/lib/Catalyst/Authentication/Credential/HTTP.pm
===================================================================
--- Catalyst-Authentication-Credential-HTTP/1.000/trunk/lib/Catalyst/Authentication/Credential/HTTP.pm 2008-09-14 14:27:46 UTC (rev 8418)
+++ Catalyst-Authentication-Credential-HTTP/1.000/trunk/lib/Catalyst/Authentication/Credential/HTTP.pm 2008-09-14 19:35:31 UTC (rev 8419)
@@ -23,12 +23,17 @@
$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 {
@@ -455,6 +460,10 @@
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
Modified: Catalyst-Authentication-Credential-HTTP/1.000/trunk/t/04pod_spelling.t
===================================================================
--- Catalyst-Authentication-Credential-HTTP/1.000/trunk/t/04pod_spelling.t 2008-09-14 14:27:46 UTC (rev 8418)
+++ Catalyst-Authentication-Credential-HTTP/1.000/trunk/t/04pod_spelling.t 2008-09-14 19:35:31 UTC (rev 8419)
@@ -21,3 +21,8 @@
Yuval
auth
username
+Authorization
+authorization
+sess
+init
+ok
More information about the Catalyst-commits
mailing list