Catalyst-Authentication-Credential-Authen-Simple-0.09000755001750001750 012042341221 22412 5ustar00mruizmruiz000000000000README100644001750001750 537112042341221 23361 0ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09NAME Catalyst::Authentication::Credential::Authen::Simple - Verify credentials with the Authen::Simple framework SYNOPSIS use Catalyst qw(Authentication); # later on ... if ($c->authenticate({ username => 'myusername', password => 'mypassword' })){ my $long_name = $c->user->get('LongName'); # Hello Mr $long_name } DESCRIPTION This module helps your Cataylst Application authenticate against a lot of credential databases thanks to the Authen::Simple framework. USAGE Just configure your Catalyst App Authentication to use class 'Authen::Simple' as the credential verifier, and give it a set of Authen::Simple classes. You can pass arguments to the Authen::Simple:XXX class constructors with the 'args' key. Note that the authen key is an array. If more than one class is specified, when your app authenticates, the username and password is submitted to each class until one of the classes returns that the user/pass pair is valid. If no class validates the credentials, the user is not able to log in. 'Plugin::Authentication' => { 'realms' => { 'default' => { 'store' => { ... } 'credential' => { 'class' => 'Authen::Simple', 'authen' => [ { 'class' => 'Passwd', 'args' => { 'path' => '/etc/shadow' } }, { 'class' => 'SSH', 'args' => { 'host' => 'host.company.com' } } ] } } } } If the Catalyst log object is compatible with the Authen::Simple log object, Authen::Simple classes will log through Catalyst. new Called by Catalyst::Authentication. Instances the Authen::Simple classes read from the configuration. authenticate Usage : Call $c->authenticate({ username => ..., password => ...}); Returns : User object if the credentials are verified successfully. undef if user not authenticated. AUTHOR Jose Luis Martinez CPAN ID: JLMARTIN CAPSiDE jlmartinez@capside.com http://www.pplusdomain.net THANKS Tobjorn Lindahl, Dylan Martin, Tomas Doran and Inigo Tejedor Arrondo for patches and recommedations COPYRIGHT Copyright (c) 2008 by Jose Luis Martinez Torres This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. SEE ALSO Authen::Simple and all of the Authen::Simple::XXX classes Changes100644001750001750 227312042341221 23772 0ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09Revision history for Perl module Catalyst::Authentication::Credential::Authen::Simple 0.09 2012-10-26 00:51:55 Europe/Madrid - "Changes" file fixed - Version not hardcoded in modules 0.08 2012-10-25 19:39:02 Europe/Madrid - Fix for #67929: Invalid META.yml - Released using Dist::Zilla 0.07 Mon Nov 16 19:07:00 2009 - Tests where failing because parent wasn't in Makefile.PL 0.06 Wed Nov 04 13:39:00 2009 - Modify test suite to not use actions in application classes (Patch by Inigo Tejedor Arrondo) (RT #50672) - Added Copyright information for Debian compliance (RT #50708) 0.05 Fri Apr 24 19:42:00 2009 - use Catalyst::Utils::ensure_class_loaded instead of Module::Load (RT #44778) 0.04 Thu Apr 23 20:12:00 2009 - If Catalyst logger is compatible with Authen::Simple classes, then use the Catalyst logger to do the logging. Tests and docs updated to reflect that. (RT #44778) 0.03 Wed Apr 01 21:02:00 2009 - updated a couple of $c->log->debug(..) to $c->log->debug(..) if $c->debug; 0.02 Sun Aug 02 17:20:00 2008 - use strict and use warnings 0.01 Sat Jun 28 13:31:03 2008 - original version; created by ExtUtils::ModuleMaker 0.51 t000755001750001750 012042341221 22576 5ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09pod.t100644001750001750 22212042341221 23661 0ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09/t# -*- perl -*- use Test::More; eval "use Test::Pod 1.00"; plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; all_pod_files_ok(); LICENSE100644001750001750 4372212042341221 23530 0ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09This software is copyright (c) 2012 by Jose Luis Martinez Torres. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2012 by Jose Luis Martinez Torres. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Suite 500, Boston, MA 02110-1335 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2012 by Jose Luis Martinez Torres. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End dist.ini100644001750001750 115312042341221 24137 0ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09name = Catalyst-Authentication-Credential-Authen-Simple author = Jose Luis Martinez Torres license = Perl_5 copyright_holder = Jose Luis Martinez Torres copyright_year = 2012 version = 0.09 [@GitHub] [GitHub::Update] metacpan = 1 [GitHub::Meta] fork = 0 [PkgVersion] [NextRelease] [ReadmeFromPod] [CopyReadmeFromBuild] [@Git] allow_dirty = dist.ini [@Filter] -bundle = @Basic -remove = Readme [Prereqs] parent = 0 Authen::Simple = 0 Catalyst::Runtime = 5.7 Catalyst::Plugin::Authentication = 0.1 [Prereqs / TestRequires ] Test::More = 0 Test::Simple = 0.44 META.yml100644001750001750 145012042341221 23744 0ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09--- abstract: 'Verify credentials with the Authen::Simple framework' author: - 'Jose Luis Martinez Torres ' build_requires: Test::More: 0 Test::Simple: 0.44 configure_requires: ExtUtils::MakeMaker: 6.30 dynamic_config: 0 generated_by: 'Dist::Zilla version 4.300028, CPAN::Meta::Converter version 2.120921' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: Catalyst-Authentication-Credential-Authen-Simple requires: Authen::Simple: 0 Catalyst::Plugin::Authentication: 0.1 Catalyst::Runtime: 5.7 parent: 0 resources: homepage: http://metacpan.org/release/Catalyst-Authentication-Credential-Authen-Simple/ repository: git://github.com/miquelruiz/Catalyst-Authentication-Credential-Authen-Simple.git version: 0.09 MANIFEST100644001750001750 102512042341221 23622 0ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09Changes LICENSE MANIFEST META.yml Makefile.PL README dist.ini examples/README examples/example.tar.bz2 lib/Catalyst/Authentication/Credential/Authen/Simple.pm t/001_load.t t/002_apptest.t t/003_apptest.t t/004_logtest.t t/lib/AuthTestApp2.pm t/lib/AuthTestApp2/Controller/Root.pm t/lib/AuthTestApp3.pm t/lib/AuthTestApp3/Controller/Root.pm t/lib/AuthTestApp4.pm t/lib/AuthTestApp4/Controller/Root.pm t/lib/Authen/Simple/Logger.pm t/lib/Authen/Simple/OnlyOne.pm t/lib/Authen/Simple/Stub.pm t/lib/TestLogger.pm t/pod.t t/podcoverage.t Makefile.PL100644001750001750 234712042341221 24453 0ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09 use strict; use warnings; use ExtUtils::MakeMaker 6.30; my %WriteMakefileArgs = ( "ABSTRACT" => "Verify credentials with the Authen::Simple framework", "AUTHOR" => "Jose Luis Martinez Torres ", "BUILD_REQUIRES" => { "Test::More" => 0, "Test::Simple" => "0.44" }, "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => "6.30" }, "DISTNAME" => "Catalyst-Authentication-Credential-Authen-Simple", "EXE_FILES" => [], "LICENSE" => "perl", "NAME" => "Catalyst::Authentication::Credential::Authen::Simple", "PREREQ_PM" => { "Authen::Simple" => 0, "Catalyst::Plugin::Authentication" => "0.1", "Catalyst::Runtime" => "5.7", "parent" => 0 }, "VERSION" => "0.09", "test" => { "TESTS" => "t/*.t" } ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) { my $br = delete $WriteMakefileArgs{BUILD_REQUIRES}; my $pp = $WriteMakefileArgs{PREREQ_PM}; for my $mod ( keys %$br ) { if ( exists $pp->{$mod} ) { $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod}; } else { $pp->{$mod} = $br->{$mod}; } } } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); 001_load.t100644001750001750 27512042341221 24406 0ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09/t# -*- perl -*- # t/001_load.t - check module loading and create testing directory use Test::More tests => 1; BEGIN { use_ok( 'Catalyst::Authentication::Credential::Authen::Simple' ); } 002_apptest.t100644001750001750 157412042341221 25173 0ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09/tuse strict; use warnings; use Test::More; plan tests => 35; use lib 't/lib'; use Catalyst::Test qw/AuthTestApp2/; cmp_ok(get("/authed_ok?username=bob&password=uniquepass"), 'eq', 'authed Bob Smith', "bob authed through onlyone"); cmp_ok(get("/authed_ok?username=john&password=uniquepass"), 'eq', 'authed John Smith', "john authed through onlyone"); cmp_ok(get("/authed_ko?username=bob&password=bob") , 'eq', 'not authed', "bob not authed through stub"); cmp_ok(get("/authed_ko?username=john&password=john") , 'eq', 'not authed', "john not authed through stub"); cmp_ok(get("/authed_ko?username=bob&password=xxx") , 'eq', 'not authed', "bob not authed"); cmp_ok(get("/authed_ko?username=john&password=xxx") , 'eq', 'not authed', "john not authed"); cmp_ok(get("/authed_ko?username=notuser&password=uniquepass"), 'eq', 'not authed', "unexistant user not authed"); 003_apptest.t100644001750001750 160112042341221 25163 0ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09/tuse strict; use warnings; use Test::More; plan tests => 35; use lib 't/lib'; use Catalyst::Test qw/AuthTestApp3/; cmp_ok(get("/authed_ok?username=bob&password=bob") , 'eq', 'authed Bob Smith', "bob authed through stub"); cmp_ok(get("/authed_ok?username=bob&password=uniquepass"), 'eq', 'authed Bob Smith', "bob authed through onlyone"); cmp_ok(get("/authed_ok?username=john&password=john") , 'eq', 'authed John Smith', "john authed through stub"); cmp_ok(get("/authed_ok?username=john&password=uniquepass"), 'eq', 'authed John Smith', "john authed through onlyone"); cmp_ok(get("/authed_ko?username=bob&password=xxx") , 'eq', 'not authed', "bob not authed"); cmp_ok(get("/authed_ko?username=john&password=xxx") , 'eq', 'not authed', "john not authed"); cmp_ok(get("/authed_ko?username=notuser&password=uniquepass"), 'eq', 'not authed', "unexistant user not authed"); 004_logtest.t100644001750001750 37612042341221 25155 0ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09/tuse strict; use warnings; use Test::More; plan tests => 8; use lib 't/lib'; use Catalyst::Test qw/AuthTestApp4/; # All tests happen inside the TestLogger object # that is loaded in AuthTestApp4 my $o = get("/authed_ok?username=bob&password=bob"); podcoverage.t100644001750001750 26112042341221 25400 0ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09/t# -*- perl -*- use Test::More; eval "use Test::Pod::Coverage 1.00"; plan skip_all => "Test::Pod::Coverage 1.00 required for testing POD coverage" if $@; all_pod_coverage_ok(); examples000755001750001750 012042341221 24151 5ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09README100644001750001750 13112042341221 25144 0ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09/examplesTarred in example.tar.bz2 is a Cat App that has an Authen::Simple Credential configured. lib000755001750001750 012042341221 23344 5ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09/tTestLogger.pm100644001750001750 125712042341221 26126 0ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09/t/libpackage TestLogger; use Test::More; sub new { return(bless {}, $_[0]); } sub info { my ($self, $message) = @_; cmp_ok($message, 'eq', 'just calling', 'got correct log info'); ok(1, 'info method got called'); } sub debug { my ($self, $message) = @_; cmp_ok($message, 'eq', 'just calling', 'got correct log info'); ok(1, 'debug method got called'); } sub error { my ($self, $message) = @_; cmp_ok($message, 'eq', 'just calling', 'got correct log info'); ok(1, 'error method got called'); } sub warn { my ($self, $message) = @_; cmp_ok($message, 'eq', 'just calling', 'got correct log info'); ok(1, 'warn method got called'); } 1; AuthTestApp2.pm100644001750001750 110612042341221 26324 0ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09/t/libpackage AuthTestApp2; use Catalyst qw/Authentication/; __PACKAGE__->config->{'Plugin::Authentication'} = { 'realms' => { 'default' => { 'store' => { 'class' => 'Minimal', 'users' => { bob => { name => "Bob Smith" }, john => { name => "John Smith" } } }, 'credential' => { 'class' => 'Authen::Simple', 'authen' => [ { 'class' => 'OnlyOne', 'args' => { 'pass' => 'uniquepass' } } ], } } } }; __PACKAGE__->setup(); AuthTestApp4.pm100644001750001750 106012042341221 26325 0ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09/t/libpackage AuthTestApp4; use TestLogger; use Catalyst qw/Authentication/; __PACKAGE__->config->{'Plugin::Authentication'} = { 'realms' => { 'default' => { 'store' => { 'class' => 'Minimal', 'users' => { bob => { name => "Bob Smith" }, john => { name => "John Smith" } } }, 'credential' => { 'class' => 'Authen::Simple', 'authen' => [ { 'class' => 'Logger' }, ], } } } }; __PACKAGE__->log( TestLogger->new ); __PACKAGE__->setup(); AuthTestApp3.pm100644001750001750 117512042341221 26333 0ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09/t/libpackage AuthTestApp3; use Catalyst qw/Authentication/; __PACKAGE__->config->{'Plugin::Authentication'} = { 'realms' => { 'default' => { 'store' => { 'class' => 'Minimal', 'users' => { bob => { name => "Bob Smith" }, john => { name => "John Smith" } } }, 'credential' => { 'class' => 'Authen::Simple', 'authen' => [ { 'class' => 'Stub' }, { 'class' => 'OnlyOne', 'args' => { 'pass' => 'uniquepass' } } ], } } } }; __PACKAGE__->setup(); example.tar.bz2100644001750001750 12247112042341221 27217 0ustar00mruizmruiz000000000000Catalyst-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VHCR1uHIYHmeUX:FZO wEj_㺐җ[un }48_yJ'0NuU$ kcBow܋;G(x|HrWXlǔg ŀǤGPVa =M:yϡ3k ,cƼ|&83L~]ʭ? nd;H +'~mlv%4 rad5uQI3~+e^ABd]-MSͻKs`GRWYӟ*䁄\ ֗? 3:lA/QZ!eoJlcg(JH;rWSTg%0TC2 hU׹\E˷ ;2'"sdaK-pOkux^hCcܭ~ Z2FKGK'R5㨱zY">أ6?EE|@ q4u ʛIrc LѾwhP3#BP``d.:{>h9?cqJ#eWN䴙+2jgө6[$T.tzId%a>q2Bp!{RWZ\ ^~!2a\}yM?a|:y2ȚԨ*oz,X*{ rE$ZLf3z29nq+ok>q8ѯv{+&.ުlWXAE3(כm!c붼tHdh!EG<E]@7pv8cߦ)m -2{s"9V$g_H) py ,Syqh]`5 JP;Q/cK0Ҍ/6ngՁj_H @g8v73)6DV6E{_ꅼX_4ͨ>H3C J섛cg78s3g6e+1X!B0`yW#B,T K1ϗkUu;ŜrTJ^=2']"KOh {? 8xR+]5ůL,چEVoIi9 :Wu4 |σ9:ڳ2d|z#Y>PtswTS⒞ڤȌm e3NY~^e6+>S5FH*S8>i`TP5Is|3^ fb,`YQ46Aa/)7~[!@"H&g!Ÿ [rOj3քgӄHZj] ( Y6>5}ҭޫq>_Ř  G&/nݠ+au.{:| }LL*ZtIg\珖\Kusꪜ+ܨf!r* Oe7o#ıT\%AZE i0 tg@` Ey:I}d9s=^L!j8L8@,I->ACBJ.BY~:d\+mjLŔ'V<>}$ BQYc$hUc ͯn%wnh EyYDtE"/@8x@jcs9t:2-y9^@w$S 6V"Simple000755001750001750 012042341221 26021 5ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09/t/lib/AuthenStub.pm100644001750001750 30312042341221 27410 0ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09/t/lib/Authen/Simplepackage Authen::Simple::Stub; use strict; use warnings; use base 'Authen::Simple::Adapter'; sub check { my ( $self, $username, $password ) = @_; return ($username eq $password); } 1; Logger.pm100644001750001750 55012042341221 27716 0ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09/t/lib/Authen/Simplepackage Authen::Simple::Logger; use strict; use warnings; use base 'Authen::Simple::Adapter'; sub check { my ( $self, $username, $password ) = @_; $self->log->debug('just calling'); $self->log->info('just calling'); $self->log->error('just calling'); $self->log->warn('just calling'); return ($username eq $password); } 1; OnlyOne.pm100644001750001750 53412042341221 30064 0ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09/t/lib/Authen/Simplepackage Authen::Simple::OnlyOne; use strict; use warnings; use base 'Authen::Simple::Adapter'; use Params::Validate qw[]; __PACKAGE__->options({ pass => { type => Params::Validate::SCALAR, optional => 0 } }); sub check { my ( $self, $username, $password ) = @_; return ($password eq $self->pass); } 1; Controller000755001750001750 012042341221 27755 5ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09/t/lib/AuthTestApp4Root.pm100644001750001750 101412042341221 31372 0ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09/t/lib/AuthTestApp4/Controllerpackage AuthTestApp4::Controller::Root; use strict; use warnings; use parent 'Catalyst::Controller'; __PACKAGE__->config(namespace => ''); sub authed_ok : Local { my ( $self, $c ) = @_; my $authd = $c->authenticate( { "username" => $c->request->param('username'), "password" => $c->request->param('password') }); if ($authd){ $c->response->body( "authed " . $c->user->get('name') ); } else { $c->response->body( "not authed" ); } $c->logout; } 1; Controller000755001750001750 012042341221 27754 5ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09/t/lib/AuthTestApp3Root.pm100644001750001750 224112042341221 31374 0ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09/t/lib/AuthTestApp3/Controllerpackage AuthTestApp3::Controller::Root; use strict; use warnings; use Test::More; use Test::Exception; use parent 'Catalyst::Controller'; __PACKAGE__->config(namespace => ''); sub authed_ko : Local { my ( $self, $c ) = @_; ok(!$c->user, "no user"); my $authd = $c->authenticate( { "username" => $c->request->param('username'), "password" => $c->request->param('password') }); ok(not($authd), "not logged in"); ok(!$c->user, "user object not present"); if ($authd){ $c->response->body( "authed" ); } else { $c->response->body( "not authed" ); } $c->logout; ok(!$c->user, "no user"); } sub authed_ok : Local { my ( $self, $c ) = @_; ok(!$c->user, "no user"); my $authd = $c->authenticate( { "username" => $c->request->param('username'), "password" => $c->request->param('password') }); ok($authd, "logged in"); ok(defined($c->user->get('name')), "user object is ok"); if ($authd){ $c->response->body( "authed " . $c->user->get('name') ); } else { $c->response->body( "not authed" ); } $c->logout; ok(!$c->user, "no user"); } 1; Controller000755001750001750 012042341221 27753 5ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09/t/lib/AuthTestApp2Root.pm100644001750001750 224112042341221 31373 0ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09/t/lib/AuthTestApp2/Controllerpackage AuthTestApp2::Controller::Root; use strict; use warnings; use Test::More; use Test::Exception; use parent 'Catalyst::Controller'; __PACKAGE__->config(namespace => ''); sub authed_ok : Local { my ( $self, $c ) = @_; ok(!$c->user, "no user"); my $authd = $c->authenticate( { "username" => $c->request->param('username'), "password" => $c->request->param('password') }); ok($authd, "logged in"); ok(defined($c->user->get('name')), "user object is ok"); if ($authd){ $c->response->body( "authed " . $c->user->get('name') ); } else { $c->response->body( "not authed" ); } $c->logout; ok(!$c->user, "no user"); } sub authed_ko : Local { my ( $self, $c ) = @_; ok(!$c->user, "no user"); my $authd = $c->authenticate( { "username" => $c->request->param('username'), "password" => $c->request->param('password') }); ok(not($authd), "not logged in"); ok(!$c->user, "user object not present"); if ($authd){ $c->response->body( "authed" ); } else { $c->response->body( "not authed" ); } $c->logout; ok(!$c->user, "no user"); } 1; Authen000755001750001750 012042341221 33142 5ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09/lib/Catalyst/Authentication/CredentialSimple.pm100644001750001750 1251712042341221 35117 0ustar00mruizmruiz000000000000Catalyst-Authentication-Credential-Authen-Simple-0.09/lib/Catalyst/Authentication/Credential/Authenpackage Catalyst::Authentication::Credential::Authen::Simple; { $Catalyst::Authentication::Credential::Authen::Simple::VERSION = '0.09'; } use strict; use warnings; use Authen::Simple; use Catalyst::Utils; sub new { my ($class, $config, $app, $realm) = @_; my $self = {}; bless $self, $class; unless (defined $config->{'authen'}){ die "No Authen::Simple classes specified for Credential::Authen::Simple in 'authen' key" } if (ref($config->{'authen'}) ne 'ARRAY') { $config->{'authen'} = [ $config->{'authen'} ]; } my $log = $app->log; my @auth_arr; foreach my $auth (@{ $config->{'authen'} }){ my $class = "Authen::Simple::$auth->{'class'}"; $log->debug("Loading class: $class") if $app->debug; Catalyst::Utils::ensure_class_loaded($class); push @auth_arr, $class->new(%{ $auth->{'args'} }); } # Catalyst documentation only says that Logger objects SHOULD # implement these methods. $log has to exist, and $log->debug too # (they've been used a couple of lines earlier) if ($log->can('warn') and $log->can('error') and $log->can('debug') and $log->can('info') ){ foreach my $auth (@auth_arr){ $auth->log($log); } } else { $log->debug('Authen::Simple classes cannot log with the configured Catalyst log object') if ($app->debug); } $self->{'_config'}->{'password_field'} ||= 'password'; $self->{'_auth'} = new Authen::Simple(@auth_arr); return $self; } sub authenticate { my ($self, $c, $realm, $authinfo) = @_; my $user = $authinfo->{'username'}; my $password = $authinfo->{'password'}; ## because passwords may be in a hashed format, we have to make sure that we remove the ## password_field before we pass it to the user routine, as some auth modules use ## all data passed to them to find a matching user... my $userfindauthinfo = {%{$authinfo}}; delete($userfindauthinfo->{$self->{'_config'}->{'password_field'}}); my $user_obj = $realm->find_user($userfindauthinfo, $c); if (not ref($user_obj)) { $c->log->debug("Unable to locate user matching user info provided") if $c->debug; return; } unless (defined $password) { $c->log->debug("Can't login a user without a password") if $c->debug; return 0; } if ($self->{'_auth'}->authenticate($user, $password)){ $c->log->debug("User $user Authenticated") if $c->debug; return $user_obj; } else { $c->log->debug("None of the Authen::Simple classes authed $user") if $c->debug;; return; } } #################### main pod documentation begin ################### =head1 NAME Catalyst::Authentication::Credential::Authen::Simple - Verify credentials with the Authen::Simple framework =head1 SYNOPSIS use Catalyst qw(Authentication); # later on ... if ($c->authenticate({ username => 'myusername', password => 'mypassword' })){ my $long_name = $c->user->get('LongName'); # Hello Mr $long_name } =head1 DESCRIPTION This module helps your Cataylst Application authenticate against a lot of credential databases thanks to the Authen::Simple framework. =head1 USAGE Just configure your Catalyst App Authentication to use class 'Authen::Simple' as the credential verifier, and give it a set of Authen::Simple classes. You can pass arguments to the Authen::Simple:XXX class constructors with the 'args' key. Note that the authen key is an array. If more than one class is specified, when your app authenticates, the username and password is submitted to each class until one of the classes returns that the user/pass pair is valid. If no class validates the credentials, the user is not able to log in. 'Plugin::Authentication' => { 'realms' => { 'default' => { 'store' => { ... } 'credential' => { 'class' => 'Authen::Simple', 'authen' => [ { 'class' => 'Passwd', 'args' => { 'path' => '/etc/shadow' } }, { 'class' => 'SSH', 'args' => { 'host' => 'host.company.com' } } ] } } } } If the Catalyst log object is compatible with the Authen::Simple log object, Authen::Simple classes will log through Catalyst. =head2 new Called by Catalyst::Authentication. Instances the Authen::Simple classes read from the configuration. =cut =head2 authenticate Usage : Call $c->authenticate({ username => ..., password => ...}); Returns : User object if the credentials are verified successfully. undef if user not authenticated. =cut =head1 AUTHOR Jose Luis Martinez CPAN ID: JLMARTIN CAPSiDE jlmartinez@capside.com http://www.pplusdomain.net =head1 THANKS Tobjorn Lindahl, Dylan Martin, Tomas Doran and Inigo Tejedor Arrondo for patches and recommedations =head1 COPYRIGHT Copyright (c) 2008 by Jose Luis Martinez Torres This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. =head1 SEE ALSO Authen::Simple and all of the Authen::Simple::XXX classes =cut #################### main pod documentation end ################### 1;