Custom Auth_Container -- Build a custom storage container
Custom Storage Containers
Here is a skeleton for a custom Auth storage container
Пример 29-1. CustomAuthContainer.php include_once 'Auth/Container.php';
class CustomAuthContainer extends Auth_Container
{
/**
* Constructor
*/
function CustomAuthContainer($params)
{
// Init Here
}
function fetchData($username, $password)
{
// Check If valid etc
if($isvalid) {
// Perform Some Actions
return true;
}
return false;
}
} |
|
And here is how to use it.
Пример 29-2. authcustom.php include_once 'CustomAuthContainer.php';
include_once 'Auth/Auth.php';
$auth_container = new CustomAuthContainer($params);
$myauth = new Auth($auth_container);
$myauth->start(); |
|
HIVE: All information for read only. Please respect copyright! |
|