Elgg  Version 5.1
Functions
pam.php File Reference

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...
 

Function Documentation

elgg_pam_authenticate ( string  $policy,
array  $authentication_params = [] 
)

Start an authentication process.

Parameters
string$policyThe policy type
array$authentication_params(optional) authentication params (eg. username/password)
Returns
bool
Since
4.3
Exceptions

Definition at line 58 of file pam.php.

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.

Parameters
callable$handlerA callable handler which can handle a given array of authentiation parameters (could be credentials)
string$importanceThe importance of the authentication handler ('sufficient' (default) or 'required')
string$policyThe policy for which the authentication handler can be used (eg. 'user' (default) or 'api')
Returns
bool
Since
4.3

Definition at line 31 of file pam.php.

elgg_unregister_pam_handler (   $handler,
string  $policy = 'user' 
)

Unregisters a PAM handler.

Parameters
callable$handlerThe callable PAM handler to unregister
string$policyThe policy type, default is 'user'
Returns
void
Since
4.3

Definition at line 44 of file pam.php.