Small typo fix
[catagits/Catalyst-Authentication-Credential-HTTP.git] / lib / Catalyst / Authentication / Credential / HTTP.pm
index 8067185..775ec08 100644 (file)
@@ -13,7 +13,7 @@ BEGIN {
     __PACKAGE__->mk_accessors(qw/_config realm/);
 }
 
-our $VERSION = "1.004";
+our $VERSION = "1.005";
 
 sub new {
     my ($class, $config, $app, $realm) = @_;
@@ -23,12 +23,17 @@ sub new {
     
     $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 @@ C<get_digest_authorization_nonce> methods as shown below.
 
 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
@@ -553,7 +562,7 @@ Set this to a string to override the default body content "Authorization require
 =item password_type
 
 The type of password returned by the user object. Same usage as in 
-L<Catalyst::Authentication::Credential::Password|Catalyst::Authentication::Credential::Password/passwprd_type>
+L<Catalyst::Authentication::Credential::Password|Catalyst::Authentication::Credential::Password/password_type>
 
 =item password_field