function init($options) { parent::init($options); AJXP_Logger::logAction('Auth.ldap :: init'); $this->ldapUrl = $options["LDAP_URL"]; if ($options["LDAP_PORT"]) { $this->ldapPort = $options["LDAP_PORT"]; } if ($options["LDAP_USER"]) { $this->ldapAdminUsername = $options["LDAP_USER"]; } if ($options["LDAP_PASSWORD"]) { $this->ldapAdminPassword = $options["LDAP_PASSWORD"]; } if ($options["LDAP_DN"]) { $this->ldapDN = $options["LDAP_DN"]; } if (isset($options["LDAP_FILTER"])) { $this->ldapFilter = $options["LDAP_FILTER"]; if ($this->ldapFilter != "" && !preg_match("/^\\(.*\\)\$/", $this->ldapFilter)) { $this->ldapFilter = "(" . $this->ldapFilter . ")"; } } else { $this->ldapFilter = "(objectClass=person)"; } if ($options["LDAP_USERATTR"]) { $this->ldapUserAttr = strtolower($options["LDAP_USERATTR"]); } else { $this->ldapUserAttr = 'uid'; } $this->ldapconn = $this->LDAP_Connect(); if ($this->ldapconn == null) { AJXP_Logger::logAction('LDAP Server connexion could NOT be established'); } }
function init($options) { parent::init($options); AJXP_Logger::logAction('Auth.ldap :: init'); $this->ldapUrl = $options["LDAP_URL"]; if ($options["LDAP_PORT"]) { $this->ldapPort = $options["LDAP_PORT"]; } if ($options["LDAP_USER"]) { $this->ldapAdminUsername = $options["LDAP_USER"]; } if ($options["LDAP_PASSWORD"]) { $this->ldapAdminPassword = $options["LDAP_PASSWORD"]; } if ($options["LDAP_DN"]) { $this->ldapDN = $options["LDAP_DN"]; } if ($options["LDAP_FILTER"]) { $this->ldapFilter = $options["LDAP_FILTER"]; } $this->ldapconn = $this->LDAP_Connect(); if ($this->ldapconn == null) { AJXP_Logger::logAction('LDAP Server connexion could NOT be established'); } }
function init($options) { parent::init($options); $this->usersSerFile = $options["USERS_FILEPATH"]; $this->slaveMode = $options["SLAVE_MODE"] == "true"; $this->secret = $options["SECRET"]; $this->urls = array($options["LOGIN_URL"], $options["LOGOUT_URL"]); }
public function init($options) { parent::init($options); if (AJXP_Utils::searchIncludePath('Auth/Yubico.php')) { require_once 'Auth/Yubico.php'; } $this->usersSerFile = AJXP_VarsFilter::filter($this->getOption("USERS_FILEPATH")); $this->yubico_secret_key = AJXP_VarsFilter::filter($this->getOption("YUBICO_SECRET_KEY")); $this->yubico_client_id = AJXP_VarsFilter::filter($this->getOption("YUBICO_CLIENT_ID")); }
public function init($options) { parent::init($options); if (!isset($this->options["FTP_LOGIN_SCREEN"]) || $this->options["FTP_LOGIN_SCREEN"] != "TRUE" || $this->options["FTP_LOGIN_SCREEN"] === false) { return; } // ENABLE WEBFTP LOGIN SCREEN $this->logDebug(__FUNCTION__, "Enabling authfront.webftp"); AJXP_PluginsService::findPluginById("authfront.webftp")->enabled = true; }
public function init($options) { parent::init($options); $this->sqlDriver = AJXP_Utils::cleanDibiDriverParameters($options["SQL_CUSTOM_DRIVER"]); $this->coreSqlDriver = AJXP_Utils::cleanDibiDriverParameters(array("group_switch_value" => "core")); $this->customTableName = $options["SQL_CUSTOM_TABLE"]; $this->customTableUid = $options["SQL_CUSTOM_TABLE_USER_FIELD"]; $this->customTablePwd = $options["SQL_CUSTOM_TABLE_PWD_FIELD"]; $this->customTableHashing = $options["SQL_CUSTOM_TABLE_PWD_HASH"]; }
function init($options) { parent::init($options); $this->sqlDriver = $options["SQL_DRIVER"]; try { dibi::connect($this->sqlDriver); } catch (DibiException $e) { echo get_class($e), ': ', $e->getMessage(), "\n"; exit(1); } }
public function init($options) { parent::init($options); $this->sqlDriver = AJXP_Utils::cleanDibiDriverParameters($options["SQL_DRIVER"]); try { dibi::connect($this->sqlDriver); } catch (DibiException $e) { echo get_class($e), ': ', $e->getMessage(), "\n"; exit(1); } }
function init($options) { parent::init($options); require_once AJXP_BIN_FOLDER . "/dibi.compact.php"; $this->sqlDriver = $options["SQL_DRIVER"]; try { dibi::connect($this->sqlDriver); } catch (DibiException $e) { echo get_class($e), ': ', $e->getMessage(), "\n"; exit(1); } }
public function init($options) { parent::init($options); $this->radiusServer = $options["RADIUS Server"]; if ($options["RADIUS Port"]) { $this->radiusPort = $options["RADIUS Port"]; } if ($options["RADIUS Shared Secret"]) { $this->radiusSecret = $options["RADIUS Shared Secret"]; } if ($options["RADIUS Auth Type"]) { $this->radiusAuthType = $options["RADIUS Auth Type"]; } }
function init($options) { parent::init($options); $this->sqlDriver = $options["SQL_DRIVER"]; try { dibi::connect($this->sqlDriver); } catch (DibiException $e) { echo get_class($e), ': ', $e->getMessage(), "\n"; exit(1); } $this->prefix = $options["PREFIX_TABLE"]; $this->groupid = $options["FEU_GROUPID"]; $this->usersSerFile = $options["USERS_FILEPATH"]; }
function init($options) { parent::init($options); // run Phalcon Eye to get session from database require_once ROOT_PATH . "/app/engine/Config.php"; require_once ROOT_PATH . "/app/engine/Exception.php"; require_once ROOT_PATH . "/app/engine/ApplicationInitialization.php"; require_once ROOT_PATH . "/app/engine/Application.php"; $application = new \Engine\Application(); $application->run('session'); $identity = Phalcon\DI::getDefault()->get('session')->get('identity'); $viewer = \User\Model\User::findFirstById($identity); if (!$viewer || !$viewer->isAdmin()) { die('Access not allowed'); } }
function init($options) { $this->slaveMode = $options["SLAVE_MODE"] == "true"; if ($this->slaveMode && ALLOW_GUEST_BROWSING) { // Make sure "login" is disabled, or it will re-appear if GUEST browsing is enabled! // OLD WAY : unset($this->actions["login"]); // NEW WAY : Modify manifest dynamically (more coplicated...) $contribs = $this->xPath->query("registry_contributions/external_file"); foreach ($contribs as $contribNode) { if ($contribNode->getAttribute('filename') == 'server/xml/standard_auth_actions.xml') { $contribNode->parentNode->removeChild($contribNode); } } } parent::init($options); $this->usersSerFile = $options["USERS_FILEPATH"]; $this->secret = $options["SECRET"]; $this->urls = array($options["LOGIN_URL"], $options["LOGOUT_URL"]); }
function init($options) { parent::init($options); $this->sqlDriver = $options["SQL_DRIVER"]; try { dibi::connect($this->sqlDriver); } catch (DibiException $e) { echo get_class($e), ': ', $e->getMessage(), "\n"; exit(1); } $this->secret = $options["SECRET"]; $this->prefix = $options["PREFIX_TABLE"]; $this->urls = array($options["LOGIN_URL"], $options["LOGOUT_URL"]); $this->slaveMode = true; $res = dibi::query("SELECT sitepref_value FROM [" . $this->prefix . "siteprefs] WHERE sitepref_name = 'FEUajaxplorer_mapi_pref_ajxp_auth_group'"); $grp = $res->fetchSingle(); $this->groupid = $grp; $res2 = dibi::query("SELECT sitepref_value FROM [" . $this->prefix . "siteprefs] WHERE sitepref_name = 'FEUajaxplorer_mapi_pref_ajxp_secret'"); $sec = $res2->fetchSingle(); $this->secret_cmsms = trim($sec); }
public function init($options) { parent::init($options); $this->usersSerFile = AJXP_VarsFilter::filter($this->getOption("USERS_FILEPATH")); }
public function init($options) { parent::init($options); $options = $this->options; $this->ldapUrl = $options["LDAP_URL"]; if (isset($options["LDAP_PROTOCOL"]) && $options["LDAP_PROTOCOL"] == "ldaps") { $this->ldapUrl = "ldaps://" . $this->ldapUrl; } if ($options["LDAP_PORT"]) { $this->ldapPort = $options["LDAP_PORT"]; } if ($options["LDAP_USER"]) { $this->ldapAdminUsername = $options["LDAP_USER"]; } if ($options["LDAP_PASSWORD"]) { $this->ldapAdminPassword = $options["LDAP_PASSWORD"]; } if (!empty($options["LDAP_FAKE_MEMBEROF"])) { $this->fakeAttrMemberOf = $options["LDAP_FAKE_MEMBEROF"]; } if (isset($options["LDAP_VALUE_MEMBERATTR_IN_GROUP"])) { $this->attrMemberInGroup = $options["LDAP_VALUE_MEMBERATTR_IN_GROUP"]; } else { $this->attrMemberInGroup = true; } if ($options["LDAP_PAGE_SIZE"]) { $this->pageSize = $options["LDAP_PAGE_SIZE"]; } if ($options["LDAP_GROUP_PREFIX"]) { $this->mappedRolePrefix = $options["LDAP_GROUP_PREFIX"]; } if ($options["LDAP_DN"]) { $this->ldapDN = $this->parseReplicatedParams($options, array("LDAP_DN")); } if ($options["LDAP_GDN"]) { $this->ldapGDN = $this->parseReplicatedParams($options, array("LDAP_GDN")); } if (is_array($options["CUSTOM_DATA_MAPPING"])) { $this->customParamsMapping = $options["CUSTOM_DATA_MAPPING"]; } $this->paramsMapping = $this->parseReplicatedParams($options, array("MAPPING_LDAP_PARAM", "MAPPING_LOCAL_TYPE", "MAPPING_LOCAL_PARAM")); if (count($this->paramsMapping)) { foreach ($this->paramsMapping as $param) { if (strtolower($param["MAPPING_LOCAL_TYPE"]) == "group_path") { $this->hasGroupsMapping = $param["MAPPING_LDAP_PARAM"]; break; } } } if (!empty($options["LDAP_FILTER"])) { $this->ldapFilter = $options["LDAP_FILTER"]; if ($this->ldapFilter != "" && !preg_match("/^\\(.*\\)\$/", $this->ldapFilter)) { $this->ldapFilter = "(" . $this->ldapFilter . ")"; } } else { if (!empty($this->hasGroupsMapping) && !empty($this->ldapGFilter)) { $this->ldapFilter = "!(" . $this->ldapGFilter . ")"; } } if (!empty($options["LDAP_GROUP_FILTER"])) { $this->ldapGFilter = $options["LDAP_GROUP_FILTER"]; if ($this->ldapGFilter != "" && !preg_match("/^\\(.*\\)\$/", $this->ldapGFilter)) { $this->ldapGFilter = "(" . $this->ldapGFilter . ")"; } } else { $this->ldapGFilter = "(objectClass=group)"; } if (!empty($options["LDAP_USERATTR"])) { $this->ldapUserAttr = strtolower($options["LDAP_USERATTR"]); } else { $this->ldapUserAttr = 'uid'; } if (!empty($options["LDAP_GROUPATTR"])) { $this->ldapGroupAttr = strtolower($options["LDAP_GROUPATTR"]); } else { $this->ldapGroupAttr = 'cn'; } }
public function init($options) { // Migrate new version of the options if (isset($options["CMS_TYPE"])) { // Transform MASTER_URL + LOGIN_URI to MASTER_HOST, MASTER_URI, LOGIN_URL, LOGOUT_URI $options["SLAVE_MODE"] = "false"; $cmsOpts = $options["CMS_TYPE"]; if ($cmsOpts["cms"] != "custom") { $loginURI = $cmsOpts["LOGIN_URI"]; if (strpos($cmsOpts["MASTER_URL"], "http") === 0) { $parse = parse_url($cmsOpts["MASTER_URL"]); $rootHost = $parse["host"]; $rootURI = $parse["path"]; } else { $rootHost = ""; $rootURI = $cmsOpts["MASTER_URL"]; } $cmsOpts["MASTER_HOST"] = $rootHost; $cmsOpts["LOGIN_URL"] = $cmsOpts["MASTER_URI"] = AJXP_Utils::securePath("/" . $rootURI . "/" . $loginURI); $logoutAction = $cmsOpts["LOGOUT_ACTION"]; switch ($cmsOpts["cms"]) { case "wp": $cmsOpts["LOGOUT_URL"] = $logoutAction == "back" ? $cmsOpts["MASTER_URL"] : $cmsOpts["MASTER_URL"] . "/wp-login.php?action=logout"; break; case "joomla": $cmsOpts["LOGOUT_URL"] = $cmsOpts["LOGIN_URL"]; break; case "drupal": $cmsOpts["LOGOUT_URL"] = $logoutAction == "back" ? $cmsOpts["LOGIN_URL"] : $cmsOpts["MASTER_URL"] . "/user/logout"; break; default: break; } } $options = array_merge($options, $cmsOpts); } $this->slaveMode = $options["SLAVE_MODE"] == "true"; if ($this->slaveMode && ConfService::getCoreConf("ALLOW_GUEST_BROWSING", "auth")) { $contribs = $this->xPath->query("registry_contributions/external_file"); foreach ($contribs as $contribNode) { if ($contribNode->getAttribute('filename') == 'plugins/core.auth/standard_auth_actions.xml') { $contribNode->parentNode->removeChild($contribNode); } } } parent::init($options); $options = $this->options; $this->usersSerFile = $options["USERS_FILEPATH"]; $this->secret = $options["SECRET"]; $this->urls = array($options["LOGIN_URL"], $options["LOGOUT_URL"]); }
public function init($options) { parent::init($options); $this->url = AJXP_VarsFilter::filter($this->getOption("GITLAB_URL")); $this->usersSerFile = $options["USERS_FILEPATH"]; }
function init($options) { parent::init($options); $this->usersSerFile = $options["USERS_FILEPATH"]; }