~ubuntu-branches/ubuntu/natty/otrs2/natty-updates

« back to all changes in this revision

Viewing changes to scripts/test/UserAuth.pl

  • Committer: Package Import Robot
  • Author(s): Torsten Werner
  • Date: 2007-04-14 17:58:55 UTC
  • mto: (20.1.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: package-import@ubuntu.com-20070414175855-9ne0w01yu1q44ch0
Tags: upstream-2.1.7
ImportĀ upstreamĀ versionĀ 2.1.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/perl -w
2
2
# --
3
 
# scripts/test/UserAuth.pl - test script of user auth 
4
 
# Copyright (C) 2003 Martin Edenhofer <martin+code@otrs.org>
 
3
# scripts/test/UserAuth.pl - test script of user auth
 
4
# Copyright (C) 2001-2006 OTRS GmbH, http://otrs.org/
5
5
# --
6
 
# $Id: UserAuth.pl,v 1.2 2003/10/13 20:29:54 martin Exp $
 
6
# $Id: UserAuth.pl,v 1.4 2006/11/02 12:21:00 tr Exp $
7
7
# --
8
8
# This program is free software; you can redistribute it and/or modify
9
9
# it under the terms of the GNU General Public License as published by
10
10
# the Free Software Foundation; either version 2 of the License, or
11
11
# (at your option) any later version.
12
 
 
12
#
13
13
# This program is distributed in the hope that it will be useful,
14
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
16
# GNU General Public License for more details.
17
 
 
17
#
18
18
# You should have received a copy of the GNU General Public License
19
19
# along with this program; if not, write to the Free Software
20
20
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
29
29
use strict;
30
30
 
31
31
use vars qw($VERSION);
32
 
$VERSION = '$Revision: 1.2 $';
 
32
$VERSION = '$Revision: 1.4 $';
33
33
$VERSION =~ s/^\$.*:\W(.*)\W.+?$/$1/;
34
34
 
35
35
use Kernel::Config;
37
37
use Kernel::System::DB;
38
38
use Kernel::System::Auth;
39
39
 
40
 
# --
41
40
# common objects
42
 
# --
43
41
my %CommonObject = ();
44
42
$CommonObject{ConfigObject} = Kernel::Config->new();
45
43
$CommonObject{LogObject} = Kernel::System::Log->new(
55
53
print "====================\n";
56
54
print "User: '$User'\n";
57
55
print "Password: ";
 
56
 
58
57
my $Pw = <STDIN>;
59
58
chomp $Pw;
 
59
 
60
60
print "\n";
61
61
print "Auth()\n";
62
62
print "------\n";
 
63
 
63
64
if ($CommonObject{AuthObject}->Auth(User => $User, Pw => $Pw)) {
64
65
    print "Successfully!\n";
65
66
}
66
67
else {
67
68
    print "Faild!\n";
68
69
}
 
70
 
69
71
print "\n";
70