Elgg
Version master
|
Go to the source code of this file.
Functions | |
elgg_register_pam_handler ($handler, string $importance= 'sufficient', string $policy= 'user') | |
Elgg Simple PAM library Contains functions for managing authentication. More... | |
elgg_unregister_pam_handler ($handler, string $policy= 'user') | |
Unregisters a PAM handler. More... | |
elgg_pam_authenticate (string $policy, array $authentication_params=[]) | |
Start an authentication process. More... | |
elgg_pam_authenticate | ( | string | $policy, |
array | $authentication_params = [] |
||
) |
elgg_register_pam_handler | ( | $handler, | |
string | $importance = 'sufficient' , |
||
string | $policy = 'user' |
||
) |
Elgg Simple PAM library Contains functions for managing authentication.
This is not a full implementation of PAM. It supports a single facility (authentication) and allows multiple policies (user authentication is the default). There are two control flags possible for each module: sufficient or required. The entire chain for a policy is processed (or until a required module fails). A module fails by returning false or throwing an exception. The order that modules are processed is determined by the order they are registered. For an example of a PAM, see .
For more information on PAMs see: http://www.freebsd.org/doc/en/articles/pam/index.html Register a PAM handler
A PAM handler should return true if the authentication attempt passed. For a failure, return false or throw an . Returning nothing indicates that the handler wants to be skipped.
callable | $handler | A callable handler which can handle a given array of authentiation parameters (could be credentials) |
string | $importance | The importance of the authentication handler ('sufficient' (default) or 'required') |
string | $policy | The policy for which the authentication handler can be used (eg. 'user' (default) or 'api') |