Initial import
[mirror/userdir-ldap.git] / web / logout.cgi
1 #!/usr/bin/perl
2
3 # (c) 1999 Debian and Randolph Chung. Licensed under the GPL. <tausq@debian.org>
4
5 use lib '.';
6 use strict vars;
7 #use Apache::Registry;
8 use CGI;
9 use Util;
10 use Net::LDAP qw(:all);
11
12 my %config = &Util::ReadConfigFile;
13 my $proto = ($ENV{HTTPS} ? "https" : "http");
14
15 my $query = new CGI;
16 my $id = $query->param('id');
17 my $authtoken = $query->param('authtoken');
18 &Util::ClearAuthToken($authtoken);
19 my $doneurl = $query->param('done') || "$config{websearchurl}";
20
21 &Util::ClearAuthToken($authtoken);
22
23 print "Location: $proto://$ENV{SERVER_NAME}/$doneurl\n\n";