X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FPlugin%2FAuthentication%2FCredential%2FHTTP.pm;h=13d63d32d686712ca30e35642fa40b36799832e2;hb=3bb378d2c7fbbea1c423016d9fe72d066a0c205c;hp=6ef0c09af4c651ef2c102d829d2e32a1b9399f0f;hpb=b0cd4eb26fd8480d4aa256831768416543f1f927;p=catagits%2FCatalyst-Authentication-Credential-HTTP.git diff --git a/lib/Catalyst/Plugin/Authentication/Credential/HTTP.pm b/lib/Catalyst/Plugin/Authentication/Credential/HTTP.pm index 6ef0c09..13d63d3 100644 --- a/lib/Catalyst/Plugin/Authentication/Credential/HTTP.pm +++ b/lib/Catalyst/Plugin/Authentication/Credential/HTTP.pm @@ -11,7 +11,7 @@ use URI::Escape (); use Catalyst (); use Digest::MD5 (); -our $VERSION = "0.02"; +our $VERSION = "0.04"; sub authenticate_http { my $c = shift; @@ -263,7 +263,7 @@ __END__ =head1 NAME -Catalyst::Plugin::Authentication::Credential::HTTP - HTTP Basic authentication +Catalyst::Plugin::Authentication::Credential::HTTP - HTTP Basic and Digest authentication for Catlayst. =head1 SYNOPSIS @@ -274,6 +274,11 @@ for Catlayst. Authentication::Credential::HTTP /; + __PACKAGE__->config->{authentication}{http}{type} = 'any'; # or 'digest' or 'basic' + __PACKAGE__->config->{authentication}{users} = { + Mufasa => { password => "Circle Of Life", }, + }; + sub foo : Local { my ( $self, $c ) = @_; @@ -297,10 +302,8 @@ for Catlayst. =head1 DESCRIPTION This moduule lets you use HTTP authentication with -L. - -Currently this module only supports the Basic scheme, but upon request Digest -will also be added. Patches welcome! +L. Both basic and digest authentication +are currently supported. =head1 METHODS @@ -313,8 +316,8 @@ C and detaches the current action call stack. =item authenticate_http -Looks inside C<< $c->request->headers >> and processes the basic (badly named) -authorization header. +Looks inside C<< $c->request->headers >> and processes the digest and basic +(badly named) authorization header. =item authorization_required_response