index.pl 919 Bytes
Newer Older
1 2 3 4
#!/usr/bin/perl

use Lemonldap::NG::Portal::SharedConf;

5 6 7 8
my $portal = Lemonldap::NG::Portal::SharedConf->new(
    {
        configStorage => {
            type    => 'File',
9
            dirName => '__CONFDIR__',
10
        },
11 12
    }
);
13

14
if ( $portal->process() ) {
15 16 17
    print $portal->header;
    print $portal->start_html;
    print "<h1>Your well authenticated !</h1>";
18
    print "Click <a href=\"$ENV{SCRIPT_NAME}?logout=1\">here</a> to logout";
19 20 21 22 23
    print $portal->end_html;
}
else {
    print $portal->header;
    print $portal->start_html;
24
    print 'Error: ' . $portal->error . '<br>';
25
    print '<form method="POST">';
26 27
    print '<input type="hidden" name="url" value="'
      . $portal->param('url') . '">';
28 29 30 31 32 33
    print 'Login : <input name="user"><br>';
    print 'Password : <input name="password" type="password" autocomplete="off"><br>';
    print '<input type=submit value="OK">';
    print $portal->end_html;
}