r19950 - in /branches/upstream/libapache2-authcassimple-perl/current: ./ debian/ examples/ inc/Module/Install/ lib/Apache2/ scripts/ t/

yvesago-guest at users.alioth.debian.org yvesago-guest at users.alioth.debian.org
Tue May 13 12:02:40 UTC 2008


Author: yvesago-guest
Date: Tue May 13 12:02:38 2008
New Revision: 19950

URL: http://svn.debian.org/wsvn/?sc=1&rev=19950
Log:
[svn-upgrade] Integrating new upstream version, libapache2-authcassimple-perl (0.05)

Added:
    branches/upstream/libapache2-authcassimple-perl/current/examples/
    branches/upstream/libapache2-authcassimple-perl/current/examples/delete_session_data.pl
    branches/upstream/libapache2-authcassimple-perl/current/t/pod_coverage.t
Removed:
    branches/upstream/libapache2-authcassimple-perl/current/debian/
    branches/upstream/libapache2-authcassimple-perl/current/inc/Module/Install/Scripts.pm
    branches/upstream/libapache2-authcassimple-perl/current/scripts/
    branches/upstream/libapache2-authcassimple-perl/current/t/pod_coverage
Modified:
    branches/upstream/libapache2-authcassimple-perl/current/Changes
    branches/upstream/libapache2-authcassimple-perl/current/MANIFEST
    branches/upstream/libapache2-authcassimple-perl/current/META.yml
    branches/upstream/libapache2-authcassimple-perl/current/Makefile.PL
    branches/upstream/libapache2-authcassimple-perl/current/README
    branches/upstream/libapache2-authcassimple-perl/current/lib/Apache2/AuthCASSimple.pm

Modified: branches/upstream/libapache2-authcassimple-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libapache2-authcassimple-perl/current/Changes?rev=19950&op=diff
==============================================================================
--- branches/upstream/libapache2-authcassimple-perl/current/Changes (original)
+++ branches/upstream/libapache2-authcassimple-perl/current/Changes Tue May 13 12:02:38 2008
@@ -1,4 +1,11 @@
 Revision history for Perl module Apache2::AuthCASSimple
+
+0.05 Tue, 13 May 2008 11:52:40 +0200
+    - clean README
+    - add use warnings
+    - move delete_session_data.pl from scripts to examples
+    - add copyright
+    - try to have better META.yml
 
 0.0.4 Sat, 12 Apr 2008 12:51:31 +0200
     - dh-make-perl don't like perl_version and version_from in Makefile.PL

Modified: branches/upstream/libapache2-authcassimple-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/branches/upstream/libapache2-authcassimple-perl/current/MANIFEST?rev=19950&op=diff
==============================================================================
--- branches/upstream/libapache2-authcassimple-perl/current/MANIFEST (original)
+++ branches/upstream/libapache2-authcassimple-perl/current/MANIFEST Tue May 13 12:02:38 2008
@@ -1,10 +1,4 @@
 Changes
-debian/changelog
-debian/compat
-debian/control
-debian/copyright
-debian/files
-debian/rules
 inc/Module/AutoInstall.pm
 inc/Module/Install.pm
 inc/Module/Install/AutoInstall.pm
@@ -14,7 +8,6 @@
 inc/Module/Install/Include.pm
 inc/Module/Install/Makefile.pm
 inc/Module/Install/Metadata.pm
-inc/Module/Install/Scripts.pm
 inc/Module/Install/Win32.pm
 inc/Module/Install/WriteAll.pm
 lib/Apache2/AuthCASSimple.pm
@@ -24,7 +17,7 @@
 MANIFEST.SKIP
 META.yml
 README
-scripts/delete_session_data.pl
+examples/delete_session_data.pl
 t/001_load.t
 t/pod.t
 t/pod_coverage.t

Modified: branches/upstream/libapache2-authcassimple-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libapache2-authcassimple-perl/current/META.yml?rev=19950&op=diff
==============================================================================
--- branches/upstream/libapache2-authcassimple-perl/current/META.yml (original)
+++ branches/upstream/libapache2-authcassimple-perl/current/META.yml Tue May 13 12:02:38 2008
@@ -1,19 +1,28 @@
 abstract: Apache2 module to authentificate trough a CAS server
 author: Yves Agostini
 build_requires: 
+  Apache2::Connection: 0
+  Apache2::Log: 0
+  Apache::Session::Wrapper: 0
+  Authen::CAS::Client: 0
   Pod::Coverage: 0
+  Test::More: 0
+  mod_perl2: 1.99
 distribution_type: module
 generated_by: Module::Install version 0.64
 license: perl
 name: Apache2-AuthCASSimple
 no_index: 
   directory: 
+    - examples
     - inc
     - t
 requires: 
+  Apache2::Connection: 0
+  Apache2::Log: 0
   Apache::Session::Wrapper: 0
   Authen::CAS::Client: 0
-  mod_perl2: 2
-  perl: 5.6.0
+  mod_perl: 1.99
+  perl: 5.8.0
 tests: t/*.t
-version: 0.0.3
+version: 0.05

Modified: branches/upstream/libapache2-authcassimple-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/branches/upstream/libapache2-authcassimple-perl/current/Makefile.PL?rev=19950&op=diff
==============================================================================
--- branches/upstream/libapache2-authcassimple-perl/current/Makefile.PL (original)
+++ branches/upstream/libapache2-authcassimple-perl/current/Makefile.PL Tue May 13 12:02:38 2008
@@ -1,17 +1,28 @@
 use inc::Module::Install;
 
 name            'Apache2-AuthCASSimple';
+perl_version    '5.008';
 all_from        'lib/Apache2/AuthCASSimple.pm';
+version_from        'lib/Apache2/AuthCASSimple.pm';
 
-requires 'mod_perl2' => 2.0;
+requires 'mod_perl' => 1.99;
 requires 'Apache::Session::Wrapper';
 requires 'Authen::CAS::Client';
+requires 'Apache2::Log';
+requires 'Apache2::Connection';
 
 build_requires  'Pod::Coverage';
+build_requires  'Test::More';
+build_requires 'mod_perl2' => 1.99;
+build_requires 'Apache::Session::Wrapper';
+build_requires 'Authen::CAS::Client';
+build_requires 'Apache2::Log';
+build_requires 'Apache2::Connection';
 
 auto_install;
 
-install_script('scripts/delete_session_data.pl');
+no_index directory => 'examples';
+#install_script('scripts/delete_session_data.pl');
 
 tests('t/*.t');
 

Modified: branches/upstream/libapache2-authcassimple-perl/current/README
URL: http://svn.debian.org/wsvn/branches/upstream/libapache2-authcassimple-perl/current/README?rev=19950&op=diff
==============================================================================
--- branches/upstream/libapache2-authcassimple-perl/current/README (original)
+++ branches/upstream/libapache2-authcassimple-perl/current/README Tue May 13 12:02:38 2008
@@ -1,15 +1,120 @@
-pod2text Apache2::AuthCASSimple.pm > README
+NAME
+    Apache2::AuthCASSimple - Apache2 module to authentificate trough a CAS
+    server
 
-If this is still here it means the programmer was too lazy to create the readme file.
+DESCRIPTION
+    Apache2::AuthCASSimple is an authentication module for
+    Apache2/mod_perl2. It allow you to authentificate users trough a Yale
+    CAS server. It means you don't need to give login/password if you've
+    already be authentificate by the CAS server, only tickets are exchanged
+    between Web client, Apache2 server and CAS server. If you not're
+    authentificate yet, you'll be redirect on the CAS server login form.
 
-You can create it now by using the command shown above from this directory.
+    This module allow the use of simple text files for sessions.
 
-At the very least you should be able to use this set of instructions
-to install the module...
+SYNOPSIS
+      <Location /protected>
+        AuthType Apache2::AuthCASSimple
+        PerlAuthenHandler Apache2::AuthCASSimple
 
-perl Makefile.PL
-make
-make test
-make install
+        PerlSetVar CASServerName my.casserver.com
+        PerlSetVar CASServerPath /
+        # PerlSetVar CASServerPort 443
+        # PerlSetVar CASServerNoSSL 1
+        PerlSetVar CASSessionTimeout 60
+        PerlSetVar CASSessionDirectory /tmp
+        # PerlSetVar CASFixDirectory /
+        # PerlSetVar ModProxy 1
 
-If you are on a windows box you should use 'nmake' rather than 'make'.
+        require valid-user
+      </Location>
+
+    or
+
+      order deny,allow
+      deny from all
+
+      require user xxx yyyy
+
+      satisfy any
+
+CONFIGURATION
+    CASServerName
+        Name of the CAS server. It can be a numeric IP address.
+
+    CASServerPort
+        Port of the CAS server. Default is 443.
+
+    CASServerPath
+        Path (URI) of the CAS server. Default is "/cas".
+
+    CASServerNoSSL
+        Disable SSL transaction wih CAS server (HTTPS). Default is off.
+
+    CASCaFile
+        CAS server public key. This file is used to allow secure connection
+        between the webserver using Apache2::AuthCASSimple and the CAS
+        server.
+
+        DEPRECATED : Authen::CAS::Client use LWP::UserAgent to make https
+        requests
+
+    CASSessionTimeout
+        Timeout (in second) for session create by Apache2::AuthCASSimple (to
+        avoid CAS server overloading). Default is 60.
+
+        -1 means disable.
+
+        0 mean infinite (until the user close browser).
+
+    CASSessionDirectory
+        Directory where session data are stored. Default is /tmp.
+
+    CASFixDirectory
+        Force the path of the session cookie for same policy in all
+        subdirectories else current directory is used.
+
+    ModProxy
+        Apache2 mod_perl2 don't be use with mod_proxy. Default is off.
+
+METHOD
+  handler
+    call by apache2
+
+VERSION
+    This documentation describes Apache2::AuthCASSimple version 0.0.1
+
+BUGS AND TROUBLESHOOTING
+    * Old expired sessions files must be deleted with an example provided
+    script : "delete_session_data.pl"
+    * Apache::Session::Wrapper certainly need Apache2::Cookie
+    * $r must be global for sessions with Apache::Session::Wrapper, add
+          PerlOptions +GlobalRequest
+
+        in your virtualhost conf
+
+    * Apreq module must be enable in debian
+          LoadModule apreq_module /usr/lib/apache2/modules/mod_apreq2.so
+
+    Please submit any bug reports to agostini at univ-metz.fr.
+
+NOTES
+    Requires "mod_perl 2" version 2.02 or later Requires Authen::CAS::Client
+    Requires Apache::Session::Wrapper
+
+AUTHOR
+        Yves Agostini
+        CPAN ID: YVESAGO
+        Univ Metz
+        agostini at univ-metz.fr
+        http://www.crium.univ-metz.fr
+
+COPYRIGHT
+    Copyright 2008 Yves Agostini - <agostini at univ-metz.fr>
+
+    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.
+

Added: branches/upstream/libapache2-authcassimple-perl/current/examples/delete_session_data.pl
URL: http://svn.debian.org/wsvn/branches/upstream/libapache2-authcassimple-perl/current/examples/delete_session_data.pl?rev=19950&op=file
==============================================================================
--- branches/upstream/libapache2-authcassimple-perl/current/examples/delete_session_data.pl (added)
+++ branches/upstream/libapache2-authcassimple-perl/current/examples/delete_session_data.pl Tue May 13 12:02:38 2008
@@ -1,0 +1,62 @@
+#!/usr/bin/perl
+
+use strict;
+use Fcntl ':flock';
+
+sub clean ($)
+{
+  my $file = shift;
+
+  print "deleting $file\n";
+
+  open(FH, ">>$file") || return -1;
+  flock(FH, LOCK_EX) || return -1;
+  unlink($file) || return -1;
+  flock(FH, LOCK_UN);
+  close(FH);
+
+  return 0;
+}
+
+my $now = time();
+my $time = (3600+60);
+
+my $dir = '/tmp';
+my $cnt=0;
+my $lnt=0;
+my $current=0;
+
+print "\nCleaning session in " . $dir . " (timeout = " . $time . ")\n\n";
+
+opendir(DIR, $dir);
+my @files = readdir(DIR);
+
+foreach my $file (@files)
+{
+  if ($file =~ /^[a-z0-9]{32}$/ )
+  {
+    if ($now - (stat($dir.'/'.$file))[8] >= $time)
+    {
+      clean($dir.'/'.$file);
+      clean($dir.'/Apache-Session-'.$file.'.lock');
+      $cnt++;
+      $lnt++;
+    }
+    else
+    {
+      $current++;
+    }
+  }
+  if ($file =~ /^Apache-Session-([a-z0-9]{32})\.lock$/ && ! -f $dir.'/'.$1 )
+  {
+    $lnt++;
+    clean($dir.'/'.$file);
+  }
+}
+
+close DIR;
+
+print "$cnt sessions deleted\n";
+print "$lnt lock sessions deleted\n";
+print "$current sessions in used\n";
+

Modified: branches/upstream/libapache2-authcassimple-perl/current/lib/Apache2/AuthCASSimple.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libapache2-authcassimple-perl/current/lib/Apache2/AuthCASSimple.pm?rev=19950&op=diff
==============================================================================
--- branches/upstream/libapache2-authcassimple-perl/current/lib/Apache2/AuthCASSimple.pm (original)
+++ branches/upstream/libapache2-authcassimple-perl/current/lib/Apache2/AuthCASSimple.pm Tue May 13 12:02:38 2008
@@ -1,6 +1,7 @@
 package Apache2::AuthCASSimple;
 
 use strict;
+use warnings;
 use Apache2::Const qw( OK AUTH_REQUIRED DECLINED REDIRECT SERVER_ERROR M_GET);
 use Apache2::RequestUtil ();
 use Apache2::RequestRec ();
@@ -10,7 +11,7 @@
 use Apache2::Connection;
 use vars qw($VERSION);
 
-$VERSION = '0.0.4';
+$VERSION = '0.05';
 
 
 #
@@ -395,7 +396,7 @@
 =over 4
 
 =item *
-Old expired sessions files must be deleted with an external provided script : C<delete_session_data.pl>
+Old expired sessions files must be deleted with an example provided script : C<delete_session_data.pl>
 
 =item *
 L<Apache::Session::Wrapper> certainly need L<Apache2::Cookie>
@@ -432,6 +433,8 @@
 
 =head1 COPYRIGHT
 
+Copyright (c) 2008 by Yves Agostini
+
 This program is free software; you can redistribute
 it and/or modify it under the same terms as Perl itself.
 

Added: branches/upstream/libapache2-authcassimple-perl/current/t/pod_coverage.t
URL: http://svn.debian.org/wsvn/branches/upstream/libapache2-authcassimple-perl/current/t/pod_coverage.t?rev=19950&op=file
==============================================================================
--- branches/upstream/libapache2-authcassimple-perl/current/t/pod_coverage.t (added)
+++ branches/upstream/libapache2-authcassimple-perl/current/t/pod_coverage.t Tue May 13 12:02:38 2008
@@ -1,0 +1,18 @@
+use strict;
+use warnings;
+use Test::More;
+
+use lib qw(lib);
+
+eval 'use Test::Pod::Coverage 1.04';
+plan skip_all => 'Test::Pod::Coverage 1.04' if $@;
+
+eval 'use Pod::Coverage 0.14';
+plan skip_all => 'Pod::Coverage 0.14 not installed' if $@;
+
+my $trustme = {
+    trustme =>
+    [qr/^new$/]
+};
+
+all_pod_coverage_ok($trustme);




More information about the Pkg-perl-cvs-commits mailing list