Elgg
Version 4.3
|
Pluggable Authentication Module. More...
Public Member Functions | |
__construct ($policy) | |
constructor More... | |
authenticate ($credentials=[]) | |
Authenticate a set of credentials against a policy This function will process all registered PAM handlers or stop when the first handler fails. More... | |
getFailureMessage () | |
Get a failure message to display to user. More... | |
Protected Attributes | |
$policy | |
$message | |
Pluggable Authentication Module.
Definition at line 10 of file ElggPAM.php.
ElggPAM::__construct | ( | $policy | ) |
constructor
string | $policy | PAM policy type: user, api, or plugin-defined policies |
Definition at line 27 of file ElggPAM.php.
ElggPAM::authenticate | ( | $credentials = [] | ) |
Authenticate a set of credentials against a policy This function will process all registered PAM handlers or stop when the first handler fails.
A handler fails by either returning false or throwing an exception. The advantage of throwing an exception is that it returns a message that can be passed to the user. The processing order of the handlers is determined by the order that they were registered.
If $credentials are provided, the PAM handler should authenticate using the provided credentials. If not, then credentials should be prompted for or otherwise retrieved (eg from the HTTP header or $_SESSION).
array | $credentials | Credentials array dependant on policy type |
Definition at line 46 of file ElggPAM.php.
ElggPAM::getFailureMessage | ( | ) |
|
protected |
Definition at line 20 of file ElggPAM.php.
|
protected |
Definition at line 15 of file ElggPAM.php.