]>
git.proxmox.com Git - pve-access-control.git/blob - test.pl
4 use PVE
::AccessControl
;
6 # create ticket using username and password
7 #my $ticket = PVE::AccessControl::create_ticket(undef, $username, $password);
9 # create ticket using ident auth
10 my $login = getpwuid($<);
11 my $username = ($< == 0) ?
'root' : "$login\@localhost";
12 my $ticket = PVE
::AccessControl
::create_ticket
(undef, $username);
13 print "got ticket using ident auth: $ticket\n";
15 for (my $i = 0; $i < 1; $i++) {
16 $ticket = PVE
::AccessControl
::create_ticket
($ticket, $username);
17 print "renewed ticket: $ticket\n";
20 my $user = 'testuser';
22 PVE
::AccessControl
::add_user
($ticket, $user, 'testpw');