From: Brian Cassidy Date: Thu, 26 Apr 2007 20:16:57 +0000 (+0000) Subject: switch to Module::Install. fix pod. add MANIFEST.SKIP X-Git-Tag: v0.03~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Authentication-Credential-HTTP-Proxy.git;a=commitdiff_plain;h=c46e37e23ee81b583f5565058f3e732ea8bccfc0 switch to Module::Install. fix pod. add MANIFEST.SKIP --- diff --git a/Build.PL b/Build.PL deleted file mode 100644 index 77b8414..0000000 --- a/Build.PL +++ /dev/null @@ -1,18 +0,0 @@ -use strict; -use Module::Build; - -my $build = Module::Build->new( - create_makefile_pl => 'traditional', - license => 'perl', - module_name => 'Catalyst::Plugin::Authentication::Credential::HTTP::Proxy', - requires => { - 'Catalyst' => '5.5', - 'Catalyst::Plugin::Authentication' => 0, - 'Test::MockObject' => '1.01', - 'LWP::Simple' => 0, - }, - create_readme => 1, - sign => 1, -); -$build->create_build_script; - diff --git a/Changes b/Changes index f9b9b8f..50223ae 100644 --- a/Changes +++ b/Changes @@ -1,4 +1,7 @@ -0.03 2006-01-01 13:35:00 +0.02 2007-04-26 + - switch to Module::Install + +0.01 2006-04-18 13:35:00 - $store->get_user now gets the user name as the first arg for maximum compatibility with stores. - Doc fixes diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP new file mode 100644 index 0000000..f21a21f --- /dev/null +++ b/MANIFEST.SKIP @@ -0,0 +1,29 @@ +# Avoid version control files. +\bRCS\b +\bCVS\b +,v$ +\B\.svn\b + +# Avoid Makemaker generated and utility files. +\bMakefile$ +\bblib +\bMakeMaker-\d +\bpm_to_blib$ +\bblibdirs$ +^MANIFEST\.SKIP$ + +# Avoid Module::Build generated and utility files. +\bBuild$ +\b_build + +# Avoid temp and backup files. +~$ +\.tmp$ +\.old$ +\.bak$ +\#$ +\b\.# +\.DS_Store$ + +# No tarballs! +\.gz$ diff --git a/Makefile.PL b/Makefile.PL new file mode 100644 index 0000000..19455ff --- /dev/null +++ b/Makefile.PL @@ -0,0 +1,13 @@ +use inc::Module::Install 0.65; + +name 'Catalyst-Plugin-Authentication-Credential-HTTP-Proxy'; +all_from 'lib/Catalyst/Plugin/Authentication/Credential/HTTP/Proxy.pm'; + +requires 'Catalyst::Runtime'; +requires 'Catalyst::Plugin::Authentication'; +requires 'Test::MockObject'; +requires 'LWP::Simple'; + +auto_install; +WriteAll; + diff --git a/lib/Catalyst/Plugin/Authentication/Credential/HTTP/Proxy.pm b/lib/Catalyst/Plugin/Authentication/Credential/HTTP/Proxy.pm index 6a8e847..fc2bb0b 100644 --- a/lib/Catalyst/Plugin/Authentication/Credential/HTTP/Proxy.pm +++ b/lib/Catalyst/Plugin/Authentication/Credential/HTTP/Proxy.pm @@ -10,8 +10,7 @@ use Catalyst (); use Catalyst::Plugin::Authentication::Credential::HTTP::User; use Carp qw/croak/; -our $VERSION = "0.01"; - +our $VERSION = "0.02"; sub authenticate_http_proxy { my $c = shift; @@ -92,7 +91,7 @@ __END__ =head1 NAME -Catalyst::Plugin::Authentication::Credential::HTTP - HTTP Basic authentication +Catalyst::Plugin::Authentication::Credential::HTTP::Proxy - HTTP Proxy authentication for Catlayst. =head1 SYNOPSIS @@ -153,7 +152,7 @@ Required. A url protected with basic authentication to authenticate against. To specify what store to use. will use the default store if not set. -=cut +=back =head1 METHODS diff --git a/lib/Catalyst/Plugin/Authentication/Credential/HTTP/User.pm b/lib/Catalyst/Plugin/Authentication/Credential/HTTP/User.pm index 09527ec..88854ec 100644 --- a/lib/Catalyst/Plugin/Authentication/Credential/HTTP/User.pm +++ b/lib/Catalyst/Plugin/Authentication/Credential/HTTP/User.pm @@ -1,11 +1,15 @@ package Catalyst::Plugin::Authentication::Credential::HTTP::User; +use strict; +use warnings; + use base 'LWP::UserAgent'; sub credentials { my ($self,$user,$pass)=@_; @{$self->{credentials}}=($user,$pass); } + sub get_basic_credentials { my $self = shift; return @{$self->{credentials}}; @@ -37,4 +41,7 @@ Marcus Ramberg