7 include_once (
'WHAT/autoload.php');
8 include_once (
'WHAT/Class.ActionRouter.php');
11 include_once (
'TOOLBOX/stop.php');
16 if (
$auth ===
false) {
17 throw new \Dcp\Exception(
"Could not get authenticator.");
20 if (isset($_REQUEST[
'logout'])) {
23 if (!method_exists(
$auth,
'logon')) {
24 throw new \Dcp\Exception(sprintf(
"Authenticator '%s' does not provide a logon() method.", get_class(
$auth)));
27 if (!isset(
$_GET[
"app"]))
$_GET[
"app"] =
"AUTHENT";
39 if ($authtype ==
'') {
42 if (!preg_match(
'/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $authtype)) {
45 $authClass = strtolower($authtype) .
"Authenticator";
46 $authFile =
DEFAULT_PUBDIR . DIRECTORY_SEPARATOR .
'WHAT' . DIRECTORY_SEPARATOR .
'Class.' . $authClass .
'.php';
47 if (!file_exists($authFile)) {
50 include_once ($authFile);
if(ActionRouter::inMaintenance()) $auth
getAuthenticator($authtype= '')