previousAuth_Container_vpopmail (Previous) (Next) Auth_Frontend_HTMLnext

View this page in Last updated: Sun, 18 Oct 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

Custom Auth_Container

Custom Auth_Container – Build a custom storage container

Custom Storage Containers

Here is a skeleton for a custom Auth storage container

CustomAuthContainer.php

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

authcustom.php

<?php
include_once 'CustomAuthContainer.php';
include_once 
'Auth/Auth.php';

$auth_container = new CustomAuthContainer($params);
$myauth = new Auth($auth_container);

$myauth->start();
?>
previousAuth_Container_vpopmail (Previous) (Next) Auth_Frontend_HTMLnext

Download Documentation Last updated: Sun, 18 Oct 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.