X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FAuthTestApp.pm;h=c8300df825938d96d75346a9acb227ff737c42cc;hb=d941289628aa271d9015d709290dcc9ef5d6395f;hp=2b8f44a61f4e4016eda3cfdcd3d4442cbb6ebc12;hpb=ac0351e16fa05aaed6d887258256374cad670497;p=catagits%2FCatalyst-Authentication-Credential-HTTP.git diff --git a/t/lib/AuthTestApp.pm b/t/lib/AuthTestApp.pm index 2b8f44a..c8300df 100644 --- a/t/lib/AuthTestApp.pm +++ b/t/lib/AuthTestApp.pm @@ -1,34 +1,29 @@ package AuthTestApp; - use Catalyst qw/ - Authentication - /; - our %users; - __PACKAGE__->config(authentication => { +use Catalyst qw/ + Authentication +/; +our %users; +__PACKAGE__->config( + 'Plugin::Authentication' => { default_realm => 'test', - realms => { - test => { - store => { - class => 'Minimal', - users => \%users, - }, - credential => { - class => 'HTTP', - type => 'basic', - password_type => 'clear', - password_field => 'password' - }, + test => { + store => { + class => 'Minimal', + users => \%users, + }, + credential => { + class => 'HTTP', + type => 'basic', + password_type => 'clear', + password_field => 'password' }, }, - }); - sub auto : Private { - my ($self, $c) = @_; - $c->authenticate(); - } - sub moose : Local { - my ( $self, $c ) = @_; - $c->res->body( $c->user->id ); - } - %users = ( - foo => { password => "s3cr3t", }, - ); - __PACKAGE__->setup; + }, +); +%users = ( + foo => { password => "s3cr3t", }, +); +__PACKAGE__->setup; + +1; +