Merge branch 'master' into after-262
[kivitendo-erp.git] / SL / Auth / Constants.pm
1 package SL::Auth::Constants;
2
3 use strict;
4
5 use Exporter qw(import);
6
7 our %EXPORT_TAGS   = (
8   OK => [ qw(
9     OK
10   ) ],
11   ERR => [ qw(
12     ERR_PASSWORD
13     ERR_BACKEND
14   ) ],
15   SESSION => [ qw(
16     SESSION_OK
17     SESSION_NONE
18     SESSION_EXPIRED
19   ) ],
20 );
21
22 # add all the other ":class" tags to the ":all" class,
23 # deleting duplicates
24 {
25  my %seen;
26  push @{$EXPORT_TAGS{all}}, grep {!$seen{$_}++} @$_ for values %EXPORT_TAGS;
27 }
28
29 Exporter::export_ok_tags('all');
30
31 use constant OK              =>   0;
32 use constant ERR_PASSWORD    =>   1;
33 use constant ERR_BACKEND     => 100;
34
35 use constant SESSION_OK      =>   0;
36 use constant SESSION_NONE    =>   1;
37 use constant SESSION_EXPIRED =>   2;
38
39 1;
40
41 __END__
42
43 =encoding utf8
44
45 =head1 NAME
46
47 SL::Auth::Constants - COnstants for Auth module
48
49 =head1 SYNOPSIS
50
51   use SL::Auth::Constants qw(:all);
52
53   OK == $auth->authenticate($user, $pass) or die;
54
55 =head1 DESCRIPTION
56
57 This module provides status constants for authentication handling
58
59 =head1 BUGS
60
61 none yet.
62
63 =head1 AUTHOR
64
65 Sven Schöling E<lt>s.schoeling@linet-services.deE<gt>
66
67 =cut