CGI-AuthRegister

 view release on metacpan or  search on metacpan

AuthRegister.pm  view on Meta::CPAN

    print CGI::redirect(-uri=>$casurl_r);
    exit; }
  my $username = param('username'); my $stoken = param('stoken');
  if ($username eq '' or $stoken eq '') {
    print header(); if ($retStatus) { return 'not logged in' }
    print $HTMLstart, $LoginMsg; exit; }

  if ($casurl !~ /^https:\/\//i) {
    my $u = CGI::url(); $u=~ s/\/[^\/]+$//; $casurl = "$u/$casurl"; }

  require LWP::UserAgent; require HTTP::Request; require Mozilla::CA;
  my $ua = LWP::UserAgent->new();
  use HTTP::Request::Common qw(POST);
  my $req = POST $casurl, [ rt=>'verify', username=>$username, stoken=>$stoken ];
  my $resp = $ua->request($req);
  my $result = 'fail';
  if ($resp->is_success) {
    my $message = $resp->decoded_content; $message =~ s/\s//g;
    if ($message eq 'answer:ok') { $result = 'ok'; &_dbg383; }
    else { $Error.=" message=($message);" }
  } else {
    $Error.= "HTTP POST error code: ". $resp->code. "\n".
      "HTTP POST error message: ".$resp->message."\n";

Changes  view on Meta::CPAN

 - added options -logout_title and -logout_redirect to the function
   require_login, which are currently used only if -cas is used

1.403 Thu May 27 22:24:16 ADT 2021
 - better error report if userid is not in users.db
 - added implementation for registration of new users
   using variable $AllowSignup in the default require_login
   setup

1.402 Wed Nov 11 08:57:45 AST 2020
 - bug report: module HTTP::Request::Common is used but not declared
   in Makefile.PL; It is declared now.
 - Note: There are some other module dependencies, which are required
   at runtime and report error if not available. This was done since
   they are not required for core functionality.  Maybe this should be
   fixed and maybe they should be required for the whole module.

1.401 Mon Nov  9 09:02:02 AST 2020
 - added GitHub repository information (thanks to Gabor Szabo)

1.4 Mon Nov  9 06:48:38 AST 2020

META.json  view on Meta::CPAN

         }
      },
      "configure" : {
         "requires" : {
            "ExtUtils::MakeMaker" : "0"
         }
      },
      "runtime" : {
         "requires" : {
            "CGI" : "0",
            "HTTP::Request::Common" : "0"
         }
      }
   },
   "release_status" : "stable",
   "resources" : {
      "repository" : {
         "type" : "git",
         "url" : "https://github.com/vkeselj/CGI-AuthRegister.git",
         "web" : "https://github.com/vkeselj/CGI-AuthRegister"
      }

META.yml  view on Meta::CPAN

meta-spec:
  url: http://module-build.sourceforge.net/META-spec-v1.4.html
  version: '1.4'
name: CGI-AuthRegister
no_index:
  directory:
    - t
    - inc
requires:
  CGI: '0'
  HTTP::Request::Common: '0'
resources:
  repository: https://github.com/vkeselj/CGI-AuthRegister.git
version: '1.404'

Makefile.PL  view on Meta::CPAN

# (c) 2012-21 Vlado Keselj (cpan:vlado vlado.ca http://vlado.ca)
use ExtUtils::MakeMaker;

WriteMakefile(
  'NAME'         => 'CGI::AuthRegister',
  'ABSTRACT'     => 'AuthRegister Module for Simple CGI Authentication'.
                    ' and Registration in Perl',
  'VERSION_FROM' => 'AuthRegister.pm', # finds $VERSION
  'PREREQ_PM'    => {
    'CGI' => 0,                     # some dependence on CGI
    'HTTP::Request::Common' => '0', # required if used with CAS functionality
  }, 
  (5.020003 >= 5.005 ?    ## Add these new keywords supported since 5.005
    ( AUTHOR => 'Vlado Keselj (cpan:vlado vlado.ca http://vlado.ca)') : ()),
    'dist'  => {'COMPRESS'=>'gzip', 'SUFFIX' => 'gz'},
  'clean' => {FILES => "tmp* *~"},
  EXE_FILES => [], #eg:[ 'bin/some_program' ],
  PMLIBDIRS => [], #eg:[ 'Package/samples', 'Package/samples/1' ],
  (eval { ExtUtils::MakeMaker->VERSION(6.46) } ? (META_MERGE => {
    'meta-spec' => { version => 2 },
    resources => { repository => {



( run in 0.474 second using v1.01-cache-2.11-cpan-de7293f3b23 )