X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/63e0f6066e8d2bf7bd07d540de9a68bc7eb386ab..5d23fb605bc40f699ab677e6ee13a7e498c9fb14:/SL/Auth/Constants.pm diff --git a/SL/Auth/Constants.pm b/SL/Auth/Constants.pm new file mode 100644 index 000000000..4fe520a45 --- /dev/null +++ b/SL/Auth/Constants.pm @@ -0,0 +1,63 @@ +package SL::Auth::Constants; + +use strict; + +use Exporter qw(import); + +our %EXPORT_TAGS = ( + OK => [ qw( + OK + ) ], + ERR => [ qw( + ERR_PASSWORD + ERR_BACKEND + ) ], + SESSION => [ qw( + SESSION_OK + SESSION_NONE + SESSION_EXPIRED + ) ], +); + +# add all the other ":class" tags to the ":all" class, +# deleting duplicates +{ + my %seen; + push @{$EXPORT_TAGS{all}}, grep {!$seen{$_}++} @$_ for values %EXPORT_TAGS; +} + +Exporter::export_ok_tags('all'); + +use constant OK => 0; +use constant ERR_PASSWORD => 1; +use constant ERR_BACKEND => 100; + +use constant SESSION_OK => 0; +use constant SESSION_NONE => 1; +use constant SESSION_EXPIRED => 2; + +1; + +__END__ + +=head1 NAME + +SL::Auth::Constants - COnstants for Auth module + +=head1 SYNOPSIS + + use SL::Auth::Constants qw(:all); + + OK == $auth->authenticate($user, $pass) or die; + +=head1 DESCRIPTION + +This module provides status constants for authentication handling + +=head1 FUNCTIONS + +=head1 BUGS + +=head1 AUTHOR + +=cut