X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flive_app_digest.t;h=79c46e12eb70837c9bf01774d923042fb8168b3f;hb=490754a879478bb59a403e73618773f3fc9d6638;hp=16088e0016d861960e907ab4262e2c8abcc17102;hpb=eebdb0e48f5073a81e9a055e80457a8a2480e7bc;p=catagits%2FCatalyst-Authentication-Credential-HTTP.git diff --git a/t/live_app_digest.t b/t/live_app_digest.t index 16088e0..79c46e1 100644 --- a/t/live_app_digest.t +++ b/t/live_app_digest.t @@ -19,24 +19,37 @@ use HTTP::Request; package AuthTestApp; use Catalyst qw/ Authentication - Authentication::Store::Minimal - Authentication::Credential::HTTP Cache /; use Test::More; - our $users; + our %users; sub moose : Local { my ( $self, $c ) = @_; - $c->authorization_required( realm => 'testrealm@host.com' ); + #$c->authenticate( { realm => 'testrealm@host.com' } ); + $c->authenticate(); $c->res->body( $c->user->id ); } + %users = ( Mufasa => { pass => "Circle Of Life", }, ); __PACKAGE__->config->{cache}{backend} = { class => 'Cache::FileCache', }; - __PACKAGE__->config->{authentication}{http}{type} = 'digest'; - __PACKAGE__->config->{authentication}{users} = $users = { - Mufasa => { password => "Circle Of Life", }, - }; + __PACKAGE__->config( authentication => { + default_realm => 'testrealm@host.com', + realms => { + 'testrealm@host.com' => { + store => { + class => 'Minimal', + users => \%users, + }, + credential => { + class => 'HTTP', + type => 'digest', + password_type => 'clear', + password_field => 'pass' + }, + }, + }, + }); __PACKAGE__->setup; } use Test::WWW::Mechanize::Catalyst qw/AuthTestApp/;