amishmm / php-pam

This extension provides PAM (Pluggable Authentication Modules) integration for PHP
Other
10 stars 5 forks source link

Add a practical example for php-pam usage in the documentation #10

Closed cristian-ciobanu closed 3 years ago

cristian-ciobanu commented 3 years ago

Please update the README document with a practical code example about how to use this module inside an application. Thank you.

amishmm commented 3 years ago

README has API on the top with parameters described just below it.

And it is self explanatory.

if (!pam_auth($user, $pass, $error, true, 'php')) {
    /* login failed */
    return false;
}
return true;

Overall above example is just one-line code and not much different from API. So I dont think we need any specific example.

cristian-ciobanu commented 3 years ago

OK! thank you.