NAME
Dancer2::Plugin::Auth::Extensible::Unix - authenticate *nix system accounts
DESCRIPTION
An authentication provider for Dancer2::Plugin::Auth::Extensible which authenticates Linux/Unix system accounts.
Uses getpwnam
and getgrent
to read user and group details, and Authen::Simple::PAM to perform authentication via PAM.
Unix group membership is used as a reasonable facsimile for roles - this seems sensible.
WARNING: in order to use PAM authentication on most modern Linux/UNIX systems the application performing authentication must have read access to the /etc/shadow
file. This is a security risk since it can lead to accidental disclosure of sensitive data if you have any path traversal vulnerabilities, etc. We strongly recommend AGAINST using this module and provide it purely as an example. Any use of it IS AT YOUR OWN RISK. You have been warned.
METHODS
authenticate_user $username, $password
get_user_details $username
Returns information from the passwd
file as a hash reference with the following keys: uid, gid, quota, comment, gecos, dir, shell, expire