On 7/20/06, Anthony Chee <[EMAIL PROTECTED]> wrote:
Hi,

I would like to know whether there are more examples about
CAP::Authentication that on WWW. The page in CPAN contains very little
information. I do not know where should I put the methods in various run
modes, setup() or cgiapp_init(). Thanks.

You might try starting with the included example script that comes
with the distribtion.  I should problaby mention in the docs that it
exists...

http://search.cpan.org/src/CEESHEK/CGI-Application-Plugin-Authentication-0.10/example/sample.cgi

This s a simple example, but it shows you how quickly you can get
setup with the Authentication plugin.

Generally most of the Authentication plugin calls can be placed in the
main part of your package, outside of any subroutines.  In most cases
it will be only two calls that need to be made.  One to configure, and
one to list which runmodes should require authentication:

SampleLogin->authen->config(%config);
SampleLogin->authen->protected_runmodes('two');

Those are straight from the included example script.

If you need more help (as it can get more complex if you want to
replace the login form with your own, or other such things), just send
another mail with your questions.  I am on holidays until the start of
next week, so you may not here from me (but others may be able to help
as well).

Cheers,

Cees

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
             http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to