authorizer??
Brian P Millett (bpm@terraweb.com)
Fri, 17 May 1996 10:47:56 -0500
Date: Fri, 17 May 1996 10:47:56 -0500
From: bpm@terraweb.com (Brian P Millett)
Message-Id: <199605171547.KAA05612@vlad>
To: fastcgi-developers@OpenMarket.com
Subject: authorizer??
(ncsa httpd 1.5.2, fcgi-devel-kit 1.4, ncsa fastcgi patch)
Hi,
I've read the docs about setting a fcgi role to be an authorizer
by setting an AuthorizeRegion flag in the server config file. Is this
possible on the ncsa server? I rewrote tiny-authorizer in perl and
found that the tiny-perl-authorizer & tiny-authorizer are not
receiving the REMOTE_USER or REMOTE_PASSWD variables. Is this because
I have not made the httpd server send the correct role? How do I do
this?
Thanks.
By the way, here is the standard example Lincoln Stein uses for the Monty
Python CGI.pm form example written to use the FCGI:
#!/opt/gnu/bin/perl
#
# python -fcgi --
#
# Perl-5 FastCGI example program
#
#
# This needs to be run with a version of perl that has been installed
# it well not work out of the build area.
#
use FCGI;
use CGI;
$cnt = 0;
while(FCGI::accept >= 0) {
$query = new CGI;
print $query->header;
print $query->start_html("Example CGI.pm Form");
print "<H1> Example FastCGI CGI.pm Form</H1>\n";
print "Running on <EM>$ENV{SERVER_NAME}</EM> to <EM>$ENV{REMOTE_HOST}</EM>\n<BR>\n";
$cnt++;
print "This is connection number $cnt\n<BR>";
&print_prompt($query);
&do_work($query);
&print_tail;
print $query->end_html;
undef(@CGI::QUERY_PARAM);
}
sub print_prompt {
my($query) = @_;
print $query->start_multipart_form;
print "<EM>What's your name?</EM><BR>";
print $query->textfield('name');
print $query->checkbox('Not my real name');
print "<P><EM>Where can you find English Sparrows?</EM><BR>";
print $query->checkbox_group(
-name=>'Sparrow locations',
-values=>[England,France,Spain,Asia,Hoboken],
-linebreak=>'yes',
-defaults=>[England,Asia]);
print "<P><EM>How far can they fly?</EM><BR>",
$query->radio_group(
-name=>'how far',
-values=>['10 ft','1 mile','10 miles','real far'],
-default=>'1 mile');
print "<P><EM>What's your favorite color?</EM> ";
print $query->popup_menu(-name=>'Color',
-values=>['black','brown','red','yellow'],
-default=>'red');
print $query->hidden('Reference','Monty Python and the Holy Grail');
print "<P><EM>What have you got there?</EM><BR>";
print $query->scrolling_list(
-name=>'possessions',
-values=>['A Coconut','A Grail','An Icon',
'A Sword','A Ticket'],
-size=>5,
-multiple=>'true');
print "<P><EM>Any parting comments?</EM><BR>";
print $query->textarea(-name=>'Comments',
-rows=>10,
-columns=>50);
print "<P>",$query->reset;
print $query->submit('Action','Shout');
print $query->submit('Action','Scream');
print $query->endform;
print "<HR>\n";
}
sub do_work {
my($query) = @_;
my(@values,$key);
print "<H2>Here are the current settings in this form</H2>";
foreach $key ($query->param) {
print "<STRONG>$key</STRONG> -> ";
@values = $query->param($key);
print join(", ",@values),"<BR>\n";
}
}
sub print_tail {
print <<END;
<HR>
<ADDRESS>Lincoln D. Stein</ADDRESS><BR>
<A HREF="/">Home Page</A>
END
;
}
---
Brian Millett
Technology Applications Inc. "Heaven can not exist,
(314) 530-1981 If the family is not eternal"
bpm@techapp.com F. Ballard Washburn