NAME
   Catalyst::Plugin::Authentication::Credential::HTTP - HTTP Basic and
   Digest authentication for Catlayst.

SYNOPSIS
       use Catalyst qw/
           Authentication
           Authentication::Store::Moose
           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 ) = @_;

           $c->authorization_required( realm => "foo" ); # named after the status code ;-)

           # either user gets authenticated or 401 is sent

           do_stuff();
       }

       # with ACL plugin
       __PACKAGE__->deny_access_unless("/path", sub { $_[0]->authenticate_http });

       sub end : Private {
           my ( $self, $c ) = @_;

           $c->authorization_required_response( realm => "foo" );
           $c->error(0);
       }

DESCRIPTION
   This moduule lets you use HTTP authentication with
   Catalyst::Plugin::Authentication. Both basic and digest authentication
   are currently supported.

METHODS
   authorization_required
       Tries to "authenticate_http", and if that fails calls
       "authorization_required_response" and detaches the current action
       call stack.

   authenticate_http
       Looks inside "$c->request->headers" and processes the digest and
       basic (badly named) authorization header.

   authorization_required_response
       Sets "$c->response" to the correct status code, and adds the correct
       header to demand authentication data from the user agent.

AUTHORS
   Yuval Kogman, "[email protected]"

   Jess Robinson

   Sascha Kiefer "[email protected]"

COPYRIGHT & LICENSE
           Copyright (c) 2005-2006 the aforementioned authors. All rights
           reserved. This program is free software; you can redistribute
           it and/or modify it under the same terms as Perl itself.