2007-04-14 15:12:11 +02:00
|
|
|
#!/usr/bin/perl
|
|
|
|
|
2010-03-20 18:14:28 +01:00
|
|
|
my $cgi = new Lemonldap::NG::Handler::CGI( { https => 0, } );
|
2007-04-14 15:12:11 +02:00
|
|
|
|
|
|
|
$cgi->authenticate();
|
|
|
|
|
|
|
|
print $cgi->header;
|
|
|
|
|
2010-03-20 18:14:28 +01:00
|
|
|
unless ( $cgi->authorize ) {
|
|
|
|
print $cgi->start_html('Forbidden');
|
2007-04-14 15:12:11 +02:00
|
|
|
print "You're not authorized to see this page";
|
|
|
|
print $cgi->end_html;
|
|
|
|
}
|
|
|
|
else {
|
2010-03-20 18:14:28 +01:00
|
|
|
print $cgi->start_html('Authorized');
|
2007-04-14 15:12:11 +02:00
|
|
|
print "<h1>Welcome</h1>You're authorized to see this page";
|
|
|
|
print $cgi->end_html;
|
|
|
|
}
|