X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FAuthDigestTestApp.pm;h=309cf5fce3ee4217483dbdd4e4860a7f5ce7d4f6;hb=d941289628aa271d9015d709290dcc9ef5d6395f;hp=101ddecc60477b355ca588522b463c5b5767fdb7;hpb=ac0351e16fa05aaed6d887258256374cad670497;p=catagits%2FCatalyst-Authentication-Credential-HTTP.git diff --git a/t/lib/AuthDigestTestApp.pm b/t/lib/AuthDigestTestApp.pm index 101ddec..309cf5f 100644 --- a/t/lib/AuthDigestTestApp.pm +++ b/t/lib/AuthDigestTestApp.pm @@ -1,26 +1,23 @@ package AuthDigestTestApp; - use Catalyst qw/ - Authentication - Cache - /; - - our %users; - sub moose : Local { - my ( $self, $c ) = @_; - #$c->authenticate( { realm => 'testrealm@host.com' } ); - $c->authenticate(); - $c->res->body( $c->user->id ); - } - my $digest_pass = Digest::MD5->new; - $digest_pass->add('Mufasa2:testrealm@host.com:Circle Of Life'); - %users = ( - Mufasa => { pass => "Circle Of Life", }, +use Catalyst qw/ + Authentication + Cache +/; + +our %users; +my $digest_pass = Digest::MD5->new; +$digest_pass->add('Mufasa2:testrealm@host.com:Circle Of Life'); +%users = ( + Mufasa => { pass => "Circle Of Life", }, Mufasa2 => { pass => $digest_pass->hexdigest, }, - ); - __PACKAGE__->config->{cache}{backend} = { - class => 'Cache::FileCache', - }; - __PACKAGE__->config( authentication => { +); +__PACKAGE__->config( + cache => { + backend => { + class => 'Cache::FileCache', + }, + }, + authentication => { default_realm => 'testrealm@host.com', realms => { 'testrealm@host.com' => { @@ -31,10 +28,14 @@ package AuthDigestTestApp; credential => { class => 'HTTP', type => 'digest', - password_type => 'clear', + password_type => 'clear', password_field => 'pass' }, }, }, - }); - __PACKAGE__->setup; + }, +); +__PACKAGE__->setup; + +1; +