5

I am building a Perl app with CGI::Application to display software tools, and would like to allow users to add ratings and comments on the tools. Ideally users would need to be registered to post. I'm sure this is a fairly common request and that there must be existing "out of the box" solutions I could use to save myself some coding and reinvention of the wheel. If not, I have three possible solutions:

1) extend the code here: http://www.perlmonks.org/?node_id=622071 to add the missing parts of an authentication system

2) make use of our wiki; have users log into it and either post the comments on the wiki OR just leverage the login system to ensure that only registered wiki users can post

3) Use some other authentication protocol and roll my own from scratch.

Does anyone have any thoughts about or experience of any of these options?

i alarmed alien
  • 9,412
  • 3
  • 27
  • 40

1 Answers1

3

There's a plugin for CGI::Application that deals with Authentication. CGI::Application::Plugin::Authentication.

Once your integrated that there's an authorization plugin to determine who can do what.

dalton
  • 3,656
  • 1
  • 25
  • 25
  • I recommend this, but if you have access to a MySQL DB, I can show you how to write up an "outside the box" answer that sanitizes inputs and uses the DB to determine credentials, as well as sets a cookie for timeouts and whatnot. (Both are required for valid login) – rownage Jan 14 '11 at 18:58
  • I looked how this worked but found it overkill, and found it easy enough to hand-roll something based on the same principles. However, I found [CGI::Application::Plugin::Authorization](https://metacpan.org/module/CGI::Application::Plugin::Authorization) to be very useful, and recommend that related module. I would recommend the *Authentication* plugin if you need to support several different authentication methods, or you need consistency across a number of sites that may use different authentication methods. – Mark Stosberg Jun 12 '12 at 13:53