X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=cgi-auth-flexible.git;a=blobdiff_plain;f=caf.pod;h=8ed5d518227c7c903cc1344caaebec0771781829;hp=ba5300cde6cc6644021bd302787e804d6fde4a32;hb=28a91929befb605f10c4136b426ffcc09950ebf9;hpb=1a701618a0a38468ed193dd5fbb0f275994bb1f4;ds=sidebyside diff --git a/caf.pod b/caf.pod index ba5300c..8ed5d51 100644 --- a/caf.pod +++ b/caf.pod @@ -7,7 +7,7 @@ CGI::Auth::Flexible - web authentication optionally using cookies =head1 SYNOPSYS my $verifier = CGI::Auth::Flexible->new_verifier(setting => value,...); - my $authreq = $verifier->new_request($cgi_query_object); + my $authreq = $verifier->new_request($cgi); # simple applications $authreq->check_ok() or return; @@ -102,6 +102,11 @@ B: If you do not override the source provision facility (see L), check that the assumptions it makes aren't going to leak security-critical data. +=item * + +Set up HTTPS on your webserver, or set the C setting +to a false value. + =back These points will now be covered in more detail. @@ -115,7 +120,7 @@ This call can be expensive and is best amortised. The resulting verifier object can be used to process individual requests, in each case with -C<< $authreq = CGI::Auth::Flexible->new_request($cgi_query) >>. +C<< $authreq = CGI::Auth::Flexible->new_request($cgi) >>. See L. @@ -326,9 +331,9 @@ Initialises an instance and returns a verifier object. The arguments are setting pairs like a hash initialiser. See L below. -=item C<< $verifier->new_request($cgi_query) >> +=item C<< $verifier->new_request($cgi) >> -Prepares to process a request. I<$cgi_query> should normally +Prepares to process a request. I<$cgi> should normally be the query object from L. Most of the default hook methods assume that it is; however if you replace enough of the hook methods then you can pass any value you like and it @@ -362,7 +367,7 @@ Discards the resources (open files, etc.) in the verifier object. =back -=head REQUEST-RELATED FUNCTIONS AND METHODS +=head1 REQUEST-RELATED FUNCTIONS AND METHODS All of these are only valid after C or C has been called. (In the case of C it won't normally be sensible @@ -404,11 +409,11 @@ whenever it is handling anything except an HTML page loads, it must call this function. See L, and L. -C will either return successfully, indicating that all +C will either return successfully, indicating that all is well and the request should proceed, or it will die, like C. -=head RESPONSE-RELATED FUNCTIONS AND METHODS +=head1 RESPONSE-RELATED FUNCTIONS AND METHODS =item C<< $authreq->url_with_query_params($params, [$nonpagetype]) >> @@ -456,18 +461,9 @@ Returns the value of the secret cookie. CGI::Auth::Flexible sets this cookie in the forms generated by C. You may also set it yourself (and indeed you must do so if you use C). -=item C<< $authreq->chain_params() >> - -Returns a hash of the "relevant" parameters to this request, in a form -used by XXX. This is all of the query parameters which are not -related to CGI::Auth::Flexible. The PATH_INFO from the request is -returned as the parameter C<< '' >>. - -xxx why use this function - =back -=head OTHER FUNCTIONS AND METHODS +=head1 OTHER FUNCTIONS AND METHODS =over @@ -503,7 +499,22 @@ class or due to previous requests on the same verifier.) See L. -=item C<< $verifier_or_authreq->($data) | CGI::Auth::Flexible->>> +=item C<< CGI::Auth::Flexible::srcdump_dir_cpio($cgi,$verifier,$dumpdir,$dir,$outfn,$how,$script) >> + +Helper function for implementing the C hook. +Generates a tarball using cpio and includes it in the prepared source +code distribution. + +The arguments are mostly the same as for that hook. C<$dir> is the +root directory at which to start the archive. C<$how> is a short text +string which will be mentioned in the log. + +C<$script> is a shell script fragment which must output a +nul-separated list of filenames (e.g. the output of C). +It is textually surrounded by C<( )> and will be executed with C +in force. Its cwd will be C<$dir>. + +=item C<< $verifier_or_authreq->($data) | CGI::Auth::Flexible-> >> Hashes the supplied data using the hash function specified by the C setting, and converts the result to a string of hex @@ -511,6 +522,198 @@ digits. =back +=head1 REQUEST TYPES + +The C<$reqtype> values understood by C are strings. +They are: + +=over + +=item C + +A top-level HTML page load. May contain confidential information for +the benefit of the logged-in user. + +=item C + +An HTML frame. May contain confidential information for +the benefit of the logged-in user. + +=item C