Update of /cvsroot/phpslash/phpslash-dev/include/modules/auth/authtypes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29559/phpslash-dev/include/modules/auth/authtypes
Added Files:
slashAuthSkel.class
Log Message:
add Skeleton auth class
--- NEW FILE: slashAuthSkel.class ---
<?php
/* $Id: slashAuthSkel.class,v 1.1 2004/09/21 11:16:59 joestewart Exp $
*
* Skeleton example for providing external authentication to phpSlash
*/
/*
class slashAuth extends slashAuth_base {
// This validation method is required.
// returns true if user is validated
// false otherwise
// The parent class loginform uses attempts to use Challenge-Response and the
// password argument will typically be blank
//
function psl_validate($username='', $password='', $response='', $user_info='') {
if (external_validation($username, $password)) {
return true;
} else {
return false;
}
}
// The example methods below all exist in the parent class and are optional
// except if required for bridging authorization to the external method.
// override the preauth to check if already externally authorized
// upon initial entry to psl.
function psl_preauth($username, $password, $user_info) {
return false;
}
// Display the login form
function auth_loginform() {
}
// Useful methods in the parent class:
// psl_register_authed($ary) - Pass user info in the argument array to
// add an authenticated user that does not exist in the psl database.
// Can be added in psl_validate above to sync the user databases upon
// success.
// set_preauth_cookie($user_info) - use a different method to set data that
// is to be checked in psl_preauth().
// get_psluser_info($username) - returns an array containing any information
// in the database corresponding to the username argument.
}
*/
?>
|