in reply to Application Access Control
1) You get one user management system valid both for cgi<->database scripts and html files (with .htaccess files in the protected directories for html files)
2) You get a ready-made management user interface in user_manage to manage users and groups, user_manage also allows you to store more items for each user than name and passwd.
Here is some code, taken largely from the POD, that implements an authentication system with Apache's htpasswd system in a perl script. (I'm working on it right now so /msg me if you want some session handling code, how to get groups, etc..).
#!/usr/bin/perl use HTTPD::Authen; print qq§Content-type: text/plain\n\n§; $auth = new HTTPD::Authen(DBType=>"Text",DB=>"/path/to/passwd_file/use +r_manage/users/passwd", Server=>"Apache"); $authen = new HTTPD::Authen::Basic($auth); if($authen->check("jeorgen", "foo")) { print "Well, the passwords match at least\n"; } else { print "Password mismatch! Intruder alert! Intruder alert!\n"; }
/jeorgen
|
|---|