From: Karen Etheridge Date: Tue, 27 Jun 2017 21:27:59 +0000 (-0700) Subject: convert to Dist::Zilla X-Git-Tag: v1.017~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Authentication-Credential-HTTP.git;a=commitdiff_plain;h=9bbe95688fad5fb88cf18639b3f96296cd98669d convert to Dist::Zilla --- diff --git a/.shipit b/.shipit deleted file mode 100644 index 74a963e..0000000 --- a/.shipit +++ /dev/null @@ -1,9 +0,0 @@ -# auto-generated shipit config file. -steps = FindVersion, ChangeVersion, CheckChangeLog, DistTest, Commit, Tag, MakeDist - -svn.tagpattern = http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Authentication-Credential-HTTP/1.000/tags/%v - -# svn.tagpattern = MyProj-%v -# svn.tagpattern = http://code.example.com/svn/tags/MyProj-%v - -CheckChangeLog.files = Changes diff --git a/Changes b/Changes index e26f013..8260d61 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,8 @@ +Release history for Catalyst-Authentication-Store-Htpasswd + +{{$NEXT}} + - modernized the tooling for 5.26 compatibility + 1.016 2013-07-27 - Fix repository metadata. RT#87114 diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP deleted file mode 100644 index 1116573..0000000 --- a/MANIFEST.SKIP +++ /dev/null @@ -1,27 +0,0 @@ -.git/ -\bMYMETA -# 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\.# -^..*\.sw[po]$ -# Avoid ShipIt configuration -.shipit diff --git a/README b/README deleted file mode 100644 index 2f7d7db..0000000 --- a/README +++ /dev/null @@ -1,142 +0,0 @@ -NAME - Catalyst::Plugin::Authentication::Credential::HTTP - HTTP Basic and - Digest authentication for Catalyst. - -SYNOPSIS - use Catalyst qw/ - Authentication - Authentication::Store::Minimal - 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. - - When authentication is required, this module sets a status of 401, and - the body of the response to 'Authorization required.'. To override this - and set your own content, check for the "$c->res->status == 401" in your - "end" action, and change the body accordingly. - - TERMS - Nonce - A nonce is a one-time value sent with each digest authentication - request header. The value must always be unique, so per default the - last value of the nonce is kept using Catalyst::Plugin::Cache. To - change this behaviour, override the - "store_digest_authorization_nonce" and - "get_digest_authorization_nonce" methods as shown below. - -METHODS - authorization_required %opts - Tries to "authenticate_http", and if that fails calls - "authorization_required_response" and detaches the current action - call stack. - - This method just passes the options through untouched. - - authenticate_http %opts - Looks inside "$c->request->headers" and processes the digest and - basic (badly named) authorization header. - - This will only try the methods set in the configuration. First - digest, then basic. - - See the next two methods for what %opts can contain. - - authenticate_basic %opts - authenticate_digest %opts - Try to authenticate one of the methods without checking if the - method is allowed in the configuration. - - %opts can contain "store" (either an object or a name), "user" (to - disregard %the username from the header altogether, overriding it - with a username or user %object). - - authorization_required_response %opts - Sets "$c->response" to the correct status code, and adds the correct - header to demand authentication data from the user agent. - - Typically used by "authorization_required", but may be invoked - manually. - - %opts can contain "realm", "domain" and "algorithm", which are used - to build %the digest header. - - store_digest_authorization_nonce $key, $nonce - get_digest_authorization_nonce $key - Set or get the $nonce object used by the digest auth mode. - - You may override these methods. By default they will call "get" and - "set" on "$c->cache". - -CONFIGURATION - All configuration is stored in - "YourApp->config->{authentication}{http}". - - This should be a hash, and it can contain the following entries: - - store - Either a name or an object -- the default store to use for HTTP - authentication. - - type - Can be either "any" (the default), "basic" or "digest". - - This controls "authorization_required_response" and - "authenticate_http", but not the "manual" methods. - - authorization_required_message - Set this to a string to override the default body content - "Authorization required." - -RESTRICTIONS - When using digest authentication, this module will only work together - with authentication stores whose User objects have a "password" method - that returns the plain-text password. It will not work together with - Catalyst::Authentication::Store::Htpasswd, or - Catalyst::Plugin::Authentication::Store::DBIC stores whose "password" - methods return a hashed or salted version of the password. - -AUTHORS - Yuval Kogman, "nothingmuch@woobling.org" - - Jess Robinson - - Sascha Kiefer "esskar@cpan.org" - -SEE ALSO - RFC 2617 (or its successors), Catalyst::Plugin::Cache, - Catalyst::Plugin::Authentication - -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. - diff --git a/dist.ini b/dist.ini new file mode 100644 index 0000000..8780532 --- /dev/null +++ b/dist.ini @@ -0,0 +1,31 @@ +name = Catalyst-Authentication-Credential-HTTP +author = יובל קוג'מן (Yuval Kogman) +license = Perl_5 +copyright_holder = יובל קוג'מן (Yuval Kogman) +copyright_year = 2006 + +; GitHub mirrors from Shadowcat. We list it in docs and metadata so we can get pull requests. +; The canonical repo is: +; r/o: git://git.shadowcat.co.uk/catagits/Catalyst-Authentication-Credential-HTTP.git +; r/w: catagits@git.shadowcat.co.uk:Catalyst-Authentication-Credential-HTTP.git +; web: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits/Catalyst-Authentication-Credential-HTTP.git + +[@Author::ETHER] +:version = 0.094 +authority = cpan:NUFFIN +GithubMeta.remote = github +server = github +Test::MinimumVersion.max_target_perl = 5.008003 +StaticInstall.dry_run = 0 ; we can safely set this here +-remove = Test::EOL ; TODO +-remove = Test::NoTabs ; TODO + +[Prereqs] +Catalyst::Plugin::Authentication = 0.10005 + +[Prereqs / DevelopRequires] +Test::WWW::Mechanize::Catalyst = 0.51 + +[MetaResources] +x_IRC = irc://irc.perl.org/#catalyst +x_MailingList = http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst diff --git a/lib/Catalyst/Authentication/Credential/HTTP.pm b/lib/Catalyst/Authentication/Credential/HTTP.pm index 0238c47..b11d1bd 100644 --- a/lib/Catalyst/Authentication/Credential/HTTP.pm +++ b/lib/Catalyst/Authentication/Credential/HTTP.pm @@ -1,4 +1,6 @@ package Catalyst::Authentication::Credential::HTTP; +# ABSTRACT: HTTP Basic and Digest authentication for Catalyst + use base qw/Catalyst::Authentication::Credential::Password/; use strict; @@ -377,7 +379,7 @@ package Catalyst::Authentication::Credential::HTTP::Nonce; use strict; use base qw[ Class::Accessor::Fast ]; -use Data::UUID (); +use Data::UUID 0.11 (); __PACKAGE__->mk_accessors(qw[ nonce nonce_count qop opaque algorithm ]); @@ -400,10 +402,11 @@ __END__ =pod -=head1 NAME - -Catalyst::Authentication::Credential::HTTP - HTTP Basic and Digest authentication -for Catalyst. +=for stopwords +rfc +rfc2617 +auth +sess =head1 SYNOPSIS @@ -658,46 +661,8 @@ with L, or L stores whose C methods return a hashed or salted version of the password. -=head1 AUTHORS - -Updated to current name space and currently maintained -by: Tomas Doran C. - -Original module by: - -=over - -=item Yuval Kogman, C - -=item Jess Robinson - -=item Sascha Kiefer C - -=back - -=head1 CONTRIBUTORS - -Patches contributed by: - -=over - -=item Peter Corlett - -=item Devin Austin (dhoss) C - -=item Ronald J Kimball - -=back - =head1 SEE ALSO RFC 2617 (or its successors), L, L -=head1 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. - =cut - diff --git a/t/author/pod.t b/t/author/pod.t deleted file mode 100644 index 8b24c40..0000000 --- a/t/author/pod.t +++ /dev/null @@ -1,5 +0,0 @@ -use Test::More; - -use Test::Pod 1.14; - -all_pod_files_ok(); diff --git a/t/author/pod_spelling.t b/t/author/pod_spelling.t deleted file mode 100644 index 9a36fce..0000000 --- a/t/author/pod_spelling.t +++ /dev/null @@ -1,35 +0,0 @@ -#!perl -w -use strict; -use warnings; -use Test::More; - -use Test::Spelling 0.11; - -set_spell_cmd('aspell list'); - -add_stopwords( grep { defined $_ && length $_ } ); - -all_pod_files_spelling_ok(); - -__DATA__ -Kimball -rfc -uri -APIs -Sascha -URI -https -dhoss -behaviour -Doran -Kiefer -Kogman -Yuval -auth -username -Authorization -authorization -sess -init -ok -Corlett diff --git a/t/author/podcoverage.t b/t/author/podcoverage.t deleted file mode 100644 index 66338a3..0000000 --- a/t/author/podcoverage.t +++ /dev/null @@ -1,5 +0,0 @@ -use Test::More; - -use Test::Pod::Coverage 1.04; - -all_pod_coverage_ok();