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();
?>
Authenticate against a vpopmail service (Previous) Default login form (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

Note by: jay.knight@stjud.eorg
It should be noted that if magic_quotes is on, added slashes are removed before being passed to fetchData. Any queries you run using them should be treated accordingly.