Tomas Doran > Catalyst-Authentication-Credential-HTTP-Proxy > Catalyst::Authentication::Credential::HTTP::Proxy

Download:
Catalyst-Authentication-Credential-HTTP-Proxy-0.06.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.06   Source  

NAME ^

Catalyst::Authentication::Credential::HTTP::Proxy - HTTP Proxy authentication for Catalyst.

SYNOPSIS ^

    use Catalyst qw/
        Authentication
    /;

    $c->config( authentication => {
        realms => {
            example => {
                credential => {
                    class => 'HTTP::Proxy',
                    type => 'basic', # Only basic supported
                    url => 'http://elkland.no/auth',
                },
            },
            store => {
                class => 'Minimal',
                users => {
                    Mufasa => { },
                },
            },
        },
    });
    
    sub foo : Local { 
        my ( $self, $c ) = @_;

        $c->authenticate(); 
        
        # either user gets authenticated or 401 is sent

        do_stuff();
    }

DESCRIPTION ^

This module lets you use HTTP Proxy authentication with Catalyst::Plugin::Authentication.

Currently this module only supports the Basic scheme, but upon request Digest will also be added. Patches welcome!

CONFIG ^

All configuration is stored in YourApp->config(authentication => { yourrealm => { credential => { class => 'HTTP::Proxy', %config } } }.

This should be a hash, and it can contain the following entries:

url

Required. A url protected with basic authentication to authenticate against.

type

Must be either basic or not present (then it defaults to basic).

This will be used to support digest authentication in future.

METHODS ^

init

Initializes the configuration.

authenticate_basic

Looks inside $c->request->headers and processes the basic (badly named) authorization header. Then authenticates this against the provided url.

AUTHORS ^

Marcus Ramberg <mramberg@cpan.org>

Tomas Doran <bobtfish@bobtfish.net>

COPYRIGHT & LICENSE ^

        Copyright (c) 2005-2008 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.
syntax highlighting: