In my mind, Kerberos - a system for authenticating users and services on a network is a good solution for you. There is a Perl extension for Kerberos 5
Authen::Krb5 in the CPAN.
Update: It isn't easy solution but, I think, that it's good and power tool for development high-quality software product which needs mechanism of authorization (for example, intranet).
--------------------------------
SV* sv_bless(SV* sv, HV* stash);
| [reply] |