17require_once 
"./Services/Object/classes/class.ilObjectGUI.php";
 
   28                $this->
ilObjectGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
 
   30                $this->lng->loadLanguageModule(
'registration');
 
   32                define(
'LDAP_DEFAULT_PORT',389);
 
   33                define(
'RADIUS_DEFAULT_PORT',1812);
 
   54                if (!$rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
 
   56                        $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
 
   59                $this->tabs_gui->setTabActive(
'authentication_settings');
 
   61                $this->tabs_gui->setSubTabActive(
"auth_settings");              
 
   63                $this->tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.auth_general.html",
 
   64                        "Services/Authentication");
 
   66                $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
 
   67                $this->tpl->setVariable(
"TXT_AUTH_TITLE", $this->lng->txt(
"auth_select"));
 
   69                $this->tpl->setVariable(
"TXT_AUTH_MODE", $this->lng->txt(
"auth_mode"));
 
   70                $this->tpl->setVariable(
"TXT_AUTH_DEFAULT", $this->lng->txt(
"default"));
 
   71                $this->tpl->setVariable(
"TXT_AUTH_ACTIVE", $this->lng->txt(
"active"));
 
   72                $this->tpl->setVariable(
"TXT_AUTH_NUM_USERS", $this->lng->txt(
"num_users"));
 
   74                $this->tpl->setVariable(
"TXT_LOCAL", $this->lng->txt(
"auth_local"));
 
   75                $this->tpl->setVariable(
"TXT_LDAP", $this->lng->txt(
"auth_ldap"));
 
   76                $this->tpl->setVariable(
"TXT_SHIB", $this->lng->txt(
"auth_shib"));
 
   78                $this->tpl->setVariable(
"TXT_CAS", $this->lng->txt(
"auth_cas"));
 
   80                $this->tpl->setVariable(
"TXT_RADIUS", $this->lng->txt(
"auth_radius"));
 
   81                $this->tpl->setVariable(
"TXT_SCRIPT", $this->lng->txt(
"auth_script"));
 
   83                $this->tpl->setVariable(
"TXT_APACHE", $this->lng->txt(
"auth_apache"));
 
   88                include_once(
'Services/LDAP/classes/class.ilLDAPServer.php');
 
   90                $icon_ok = 
"<img src=\"".ilUtil::getImagePath(
"icon_ok.svg").
"\" alt=\"".$this->lng->txt(
"enabled").
"\" title=\"".$this->lng->txt(
"enabled").
"\" border=\"0\" vspace=\"0\"/>";
 
   91                $icon_not_ok = 
"<img src=\"".ilUtil::getImagePath(
"icon_not_ok.svg").
"\" alt=\"".$this->lng->txt(
"disabled").
"\" title=\"".$this->lng->txt(
"disabled").
"\" border=\"0\" vspace=\"0\"/>";
 
   94                foreach($auth_modes as $mode => $mode_name)
 
  101                        $this->tpl->setCurrentBlock(
'auth_mode');
 
  106                                $this->tpl->setVariable(
"AUTH_NAME", 
$server->getName());
 
  107                                $this->tpl->setVariable(
'AUTH_ACTIVE',
$server->isActive() ? $icon_ok : $icon_not_ok);
 
  111                                $this->tpl->setVariable(
"AUTH_NAME", $this->lng->txt(
"auth_" . $mode_name));
 
  112                                $this->tpl->setVariable(
'AUTH_ACTIVE',$this->
ilias->getSetting($mode_name . 
'_active') || $mode == 
AUTH_LOCAL ? $icon_ok : $icon_not_ok);
 
  117                                $this->tpl->setVariable(
"AUTH_CHECKED",
"checked=\"checked\"");
 
  119                                $this->tpl->setVariable(
"AUTH_USER_NUM",
 
  120                                                                                ((
int) $auth_cnt[$mode_name] + $auth_cnt[
"default"]).
" (".$this->lng->txt(
"auth_per_default").
 
  121                                                                                ": ".$auth_cnt[
"default"].
")");
 
  125                                $this->tpl->setVariable(
"AUTH_USER_NUM",
 
  126                                                                                (
int) $auth_cnt[$mode_name]);
 
  128                        $this->tpl->setVariable(
"AUTH_ID",$mode_name);
 
  129                        $this->tpl->setVariable(
"AUTH_VAL",$mode);
 
  130                        $this->tpl->parseCurrentBlock();
 
  133                $this->tpl->setVariable(
"TXT_CONFIGURE", $this->lng->txt(
"auth_configure"));
 
  134                $this->tpl->setVariable(
"TXT_AUTH_REMARK", $this->lng->txt(
"auth_remark_non_local_auth"));
 
  135                $this->tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"save"));
 
  136                $this->tpl->setVariable(
"CMD_SUBMIT", 
"setAuthMode");
 
  141                        $this->tpl->setVariable(
'TABLE_AUTH_DETERMINATION',$this->form->getHTML());
 
  145                $this->tpl->setVariable(
"FORMACTION_ROLES",
 
  146                        $this->ctrl->getFormAction($this));
 
  147                $this->tpl->setVariable(
"TXT_AUTH_ROLES", $this->lng->txt(
"auth_active_roles"));
 
  148                $this->tpl->setVariable(
"TXT_ROLE", $this->lng->txt(
"obj_role"));
 
  149                $this->tpl->setVariable(
"TXT_ROLE_AUTH_MODE", $this->lng->txt(
"auth_role_auth_mode"));
 
  150                $this->tpl->setVariable(
"CMD_SUBMIT_ROLES", 
"updateAuthRoles");
 
  152                include_once(
"./Services/AccessControl/classes/class.ilObjRole.php");
 
  156                include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
 
  159                foreach ($reg_roles as $role)
 
  161                        foreach ($active_auth_modes as $auth_name => $auth_key)
 
  166                                if ($auth_name == 
"default" || $auth_name == 
"cas" 
  167                                        || $auth_name == 
"shibboleth" || $auth_name == 
'ldap'  
  168                                        || $auth_name == 
'apache' || $auth_name == 
"ecs" 
  169                                        || $auth_name == 
"openid")
 
  174                                $this->tpl->setCurrentBlock(
"auth_mode_selection");
 
  176                                if ($auth_name == 
'default')
 
  187                                        $name = $this->lng->txt(
'auth_'.$auth_name);
 
  190                                $this->tpl->setVariable(
"AUTH_MODE_NAME", $name);
 
  192                                $this->tpl->setVariable(
"AUTH_MODE", $auth_name);
 
  194                                if ($role[
'auth_mode'] == $auth_name)
 
  196                                        $this->tpl->setVariable(
"SELECTED_AUTH_MODE", 
"selected=\"selected\"");
 
  199                                $this->tpl->parseCurrentBlock();
 
  202                        $this->tpl->setCurrentBlock(
"roles");
 
  203                        $this->tpl->setVariable(
"ROLE", $role[
'title']);
 
  204                        $this->tpl->setVariable(
"ROLE_ID", $role[
'id']);
 
  205                        $this->tpl->parseCurrentBlock();
 
  220                if (!$rbacsystem->checkAccess(
"visible,read", $this->object->getRefId()))
 
  222                        $this->
ilias->raiseError($this->lng->txt(
"permission_denied"), $this->ilias->error_obj->MESSAGE);
 
  225                $this->tabs_gui->setTabActive(
"authentication_settings");
 
  227                $this->tabs_gui->setSubTabActive(
"auth_login_editor");
 
  229                $lng->loadLanguageModule(
"meta");
 
  231                $this->tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.auth_login_messages.html",
 
  232                        "Services/Authentication");
 
  233                $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
 
  234                $this->tpl->setVariable(
"TXT_HEADLINE", $this->lng->txt(
"login_information"));
 
  235                $this->tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"login_information_desc"));
 
  236                $this->tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"save"));
 
  237                $this->initLoginForm();
 
  238                $this->tpl->setVariable(
'LOGIN_INFO',$this->form->getHTML());
 
  244                $this->ctrl->redirect($this, 
"authSettings");
 
  251                if (!$rbacsystem->checkAccess(
"write",$this->object->getRefId()))
 
  253                        $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
 
  256                if (empty(
$_POST[
"auth_mode"]))
 
  258                        $this->
ilias->raiseError($this->lng->txt(
"auth_err_no_mode_selected"),$this->ilias->error_obj->MESSAGE);
 
  261                if (
$_POST[
"auth_mode"] == AUTH_DEFAULT)
 
  263                        ilUtil::sendInfo($this->lng->txt(
"auth_mode").
": ".$this->getAuthModeTitle().
" ".$this->lng->txt(
"auth_mode_not_changed"),
true);
 
  264                        $this->ctrl->redirect($this,
'authSettings');
 
  267                switch (
$_POST[
"auth_mode"])
 
  281                                if ($this->object->checkAuthSHIB() !== 
true)
 
  289                                if ($this->object->checkAuthRADIUS() !== 
true)
 
  292                                        $this->ctrl->redirect($this,
'editRADIUS');
 
  297                                if ($this->object->checkAuthScript() !== 
true)
 
  305                $this->
ilias->setSetting(
"auth_mode",
$_POST[
"auth_mode"]);
 
  307                ilUtil::sendSuccess($this->lng->txt(
"auth_default_mode_changed_to").
" ".$this->getAuthModeTitle(),
true);
 
  308                $this->ctrl->redirect($this,
'authSettings');
 
  320                if (!$rbacsystem->checkAccess(
"read",$this->object->getRefId()))
 
  322                        $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
 
  325                $this->tabs_gui->setTabActive(
'auth_soap');
 
  328                $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.auth_soap.html',
'Services/Authentication');
 
  331                $role_list = $rbacreview->getRolesByFilter(2,$this->object->getId());
 
  334                foreach ($role_list as $role)
 
  336                        $roles[$role[
'obj_id']] = $role[
'title'];
 
  340                include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
  343                $soap_config->setTitle($this->lng->txt(
"auth_soap_auth"));
 
  344                $soap_config->setDescription($this->lng->txt(
"auth_soap_auth_desc"));
 
  345                $soap_config->setFormAction($this->ctrl->getFormAction($this, 
"editSOAP"));
 
  346                $soap_config->addCommandButton(
"saveSOAP", $this->lng->txt(
"save"));
 
  347                $soap_config->addCommandButton(
"editSOAP", $this->lng->txt(
"cancel"));
 
  351                $active->setTitle($this->lng->txt(
"active"));
 
  352                $active->setPostVar(
"soap[active]");
 
  356                $server->setTitle($this->lng->txt(
"server"));
 
  357                $server->setInfo($this->lng->txt(
"auth_soap_server_desc"));
 
  358                $server->setPostVar(
"soap[server]");
 
  365                $port->setTitle($this->lng->txt(
"port"));
 
  366                $port->setInfo($this->lng->txt(
"auth_soap_port_desc"));
 
  367                $port->setPostVar(
"soap[port]");
 
  369                $port->setMaxLength(5);
 
  373                $https->setTitle($this->lng->txt(
"auth_soap_use_https"));
 
  374                $https->setPostVar(
"soap[use_https]");
 
  378                $uri->setTitle($this->lng->txt(
"uri"));
 
  379                $uri->setInfo($this->lng->txt(
"auth_soap_uri_desc"));
 
  380                $uri->setPostVar(
"soap[uri]");
 
  382                $uri->setMaxLength(256);
 
  386                $namespace->setTitle($this->lng->txt(
"auth_soap_namespace"));
 
  387                $namespace->setInfo($this->lng->txt(
"auth_soap_namespace_desc"));
 
  394                $dotnet->setTitle($this->lng->txt(
"auth_soap_use_dotnet"));
 
  395                $dotnet->setPostVar(
"soap[use_dotnet]");
 
  399                $createuser->setTitle($this->lng->txt(
"auth_create_users"));
 
  400                $createuser->setInfo($this->lng->txt(
"auth_soap_create_users_desc"));
 
  401                $createuser->setPostVar(
"soap[create_users]");
 
  405                $sendmail->setTitle($this->lng->txt(
"user_send_new_account_mail"));
 
  406                $sendmail->setInfo($this->lng->txt(
"auth_new_account_mail_desc"));
 
  407                $sendmail->setPostVar(
"soap[account_mail]");
 
  411                $defaultrole->setTitle($this->lng->txt(
"auth_user_default_role"));
 
  412                $defaultrole->setInfo($this->lng->txt(
"auth_soap_user_default_role_desc"));
 
  413                $defaultrole->setPostVar(
"soap[user_default_role]");
 
  414                $defaultrole->setOptions($roles);
 
  418                $allowlocal->setTitle($this->lng->txt(
"auth_allow_local"));
 
  419                $allowlocal->setInfo($this->lng->txt(
"auth_soap_allow_local_desc"));
 
  420                $allowlocal->setPostVar(
"soap[allow_local]");
 
  428                        $active         ->setChecked(
$_SESSION[
"error_post_vars"][
"soap"][
"active"]);
 
  430                        $port           ->setValue(
$_SESSION[
"error_post_vars"][
"soap"][
"port"]);
 
  431                        $https          ->setChecked(
$_SESSION[
"error_post_vars"][
"soap"][
"use_https"]);
 
  432                        $uri            ->setValue(
$_SESSION[
"error_post_vars"][
"soap"][
"uri"]);
 
  434                        $dotnet         ->setChecked(
$_SESSION[
"error_post_vars"][
"soap"][
"use_dotnet"]);
 
  435                        $createuser     ->setChecked(
$_SESSION[
"error_post_vars"][
"soap"][
"create_users"]);
 
  436                        $allowlocal     ->setChecked(
$_SESSION[
"error_post_vars"][
"soap"][
"allow_local"]);
 
  437                        $defaultrole->setValue(
$_SESSION[
"error_post_vars"][
"soap"][
"user_default_role"]);
 
  438                        $sendmail       ->setChecked(
$_SESSION[
"error_post_vars"][
"soap"][
"account_mail"]);
 
  442                        $active         ->setChecked($settings[
"soap_auth_active"]);
 
  443                        $server         ->setValue($settings[
"soap_auth_server"]);
 
  444                        $port           ->setValue($settings[
"soap_auth_port"]);
 
  445                        $https          ->setChecked($settings[
"soap_auth_use_https"]);
 
  446                        $uri            ->setValue($settings[
"soap_auth_uri"]);
 
  447                        $namespace      ->setValue($settings[
"soap_auth_namespace"]);
 
  448                        $dotnet         ->setChecked($settings[
"soap_auth_use_dotnet"]);
 
  449                        $createuser     ->setChecked($settings[
"soap_auth_create_users"]);
 
  450                        $allowlocal     ->setChecked($settings[
"soap_auth_allow_local"]);
 
  451                        $defaultrole->setValue($settings[
"soap_auth_user_default_role"]);
 
  452                        $sendmail       ->setChecked($settings[
"soap_auth_account_mail"]);
 
  455                if (!$defaultrole->getValue())
 
  457                        $defaultrole->setValue(4);
 
  461                $soap_config->addItem($active);
 
  462                $soap_config->addItem(
$server);
 
  463                $soap_config->addItem($port);
 
  464                $soap_config->addItem(
$https);
 
  465                $soap_config->addItem($uri);
 
  467                $soap_config->addItem($dotnet);
 
  468                $soap_config->addItem($createuser);
 
  469                $soap_config->addItem($sendmail);
 
  470                $soap_config->addItem($defaultrole);
 
  471                $soap_config->addItem($allowlocal);
 
  473                $this->tpl->setVariable(
"CONFIG_FORM", $soap_config->getHTML());
 
  477                $form->setFormAction(
$ilCtrl->getFormAction($this));
 
  478                $form->setTitle(
"Test Request");
 
  480                $form->addItem($text_prop);
 
  482                $form->addItem($text_prop2);
 
  486                $form->addCommandButton(
"testSoapAuthConnection",
 
  489                if (
$ilCtrl->getCmd() == 
"testSoapAuthConnection")
 
  491                        include_once(
"./Services/SOAPAuth/classes/class.ilSOAPAuth.php");
 
  492                        $ret = 
"<br />".ilSOAPAuth::testConnection(
 
  495                                (
boolean) 
$_POST[
"new_user"]
 
  498                $this->tpl->setVariable(
"TEST_FORM", $form->getHTML().$ret);
 
  515                if (!$rbacsystem->checkAccess(
"write",$this->object->getRefId()))
 
  517                        $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
 
  521                if (!
$_POST[
"soap"][
"server"])
 
  523                        $this->
ilias->raiseError($this->lng->txt(
"fill_out_all_required_fields"),$this->ilias->error_obj->MESSAGE);
 
  527                if (
$_POST[
"soap"][
"server"] != 
"" && (preg_match(
"/^[0-9]{0,5}$/",
$_POST[
"soap"][
"port"])) == 
false)
 
  529                        $this->
ilias->raiseError($this->lng->txt(
"err_invalid_port"),$this->ilias->error_obj->MESSAGE);
 
  542                $ilSetting->set(
"soap_auth_user_default_role", 
$_POST[
"soap"][
"user_default_role"]);
 
  545                $this->ctrl->redirect($this,
'editSOAP');
 
  557                if (!$rbacsystem->checkAccess(
"write",$this->object->getRefId()))
 
  559                        $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
 
  564                        $this->tpl->setVariable(
"AUTH_SCRIPT_NAME", 
$_SESSION[
"error_post_vars"][
"auth_script"][
"name"]);
 
  569                        $settings = $this->
ilias->getAllSettings();
 
  571                        $this->tpl->setVariable(
"AUTH_SCRIPT_NAME", $settings[
"auth_script_name"]);
 
  574                $this->tabs_gui->setTabActive(
'auth_script');
 
  576                $this->tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.auth_script.html",
 
  577                        "Services/Authentication");
 
  579                $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
 
  580                $this->tpl->setVariable(
"COLSPAN", 3);
 
  581                $this->tpl->setVariable(
"TXT_AUTH_SCRIPT_TITLE", $this->lng->txt(
"auth_script_configure"));
 
  582                $this->tpl->setVariable(
"TXT_OPTIONS", $this->lng->txt(
"options"));
 
  583                $this->tpl->setVariable(
"TXT_AUTH_SCRIPT_NAME", $this->lng->txt(
"auth_script_name"));
 
  585                $this->tpl->setVariable(
"TXT_REQUIRED_FLD", $this->lng->txt(
"required_field"));
 
  586                $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
 
  587                $this->tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"save"));
 
  588                $this->tpl->setVariable(
"CMD_SUBMIT", 
"saveScript");
 
  599                if (!
$_POST[
"auth_script"][
"name"])
 
  601                        $this->
ilias->raiseError($this->lng->txt(
"fill_out_all_required_fields"),$this->ilias->error_obj->MESSAGE);
 
  614                $this->
ilias->setSetting(
"auth_script_name", 
$_POST[
"auth_script"][
"name"]);
 
  617                ilUtil::sendSuccess($this->lng->txt(
"auth_mode_changed_to").
" ".$this->getAuthModeTitle(),
true);
 
  618                $this->ctrl->redirect($this,
'editScript');
 
  630                switch ($this->
ilias->getSetting(
"auth_mode"))
 
  633                                return $this->lng->txt(
"auth_local");
 
  637                                return $this->lng->txt(
"auth_ldap");
 
  641                                return $this->lng->txt(
"auth_shib");
 
  645                                return $this->lng->txt(
"auth_radius");
 
  649                                return $this->lng->txt(
"auth_script");
 
  653                                return $this->lng->txt(
"auth_apache");
 
  657                                return $this->lng->txt(
"unknown");
 
  666                if (!$rbacsystem->checkAccess(
"write",$this->object->getRefId()))
 
  668                        $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
 
  671                include_once(
'./Services/AccessControl/classes/class.ilObjRole.php');
 
  675                $this->ctrl->redirect($this,
'authSettings');
 
  685                if(is_object($this->form))
 
  691                include_once(
'Services/Authentication/classes/class.ilAuthModeDetermination.php');
 
  693                if($det->getCountActiveAuthModes() <= 1)
 
  698                include_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
 
  700                $this->form->setFormAction($this->ctrl->getFormAction($this));
 
  701                $this->form->setTableWidth(
'100%');
 
  702                $this->form->setTitle($this->lng->txt(
'auth_auth_settings'));
 
  703                $this->form->addCommandButton(
'updateAuthModeDetermination',$this->lng->txt(
'save'));
 
  705                require_once 
'Services/Captcha/classes/class.ilCaptchaUtil.php';
 
  706                $cap = 
new ilCheckboxInputGUI($this->lng->txt(
'adm_captcha_anonymous_short'), 
'activate_captcha_anonym');
 
  707                $cap->setInfo($this->lng->txt(
'adm_captcha_anonymous_auth'));
 
  711                        $cap->setAlert(ilCaptchaUtil::getPreconditionsMessage());
 
  713                $cap->setChecked(ilCaptchaUtil::isActiveForLogin());
 
  714                $this->form->addItem($cap);
 
  717                $header->setTitle($this->lng->txt(
'auth_auth_mode_determination'));
 
  721                $kind->setInfo($this->lng->txt(
'auth_mode_determination_info'));
 
  722                $kind->setValue($det->getKind());
 
  723                $kind->setRequired(
true);
 
  725                $option_user = 
new ilRadioOption($this->lng->txt(
'auth_by_user'),0);
 
  726                $kind->addOption($option_user);
 
  728                $option_determination = 
new ilRadioOption($this->lng->txt(
'auth_automatic'),1);
 
  730                include_once(
'Services/Authentication/classes/class.ilAuthUtils.php');
 
  732                $auth_sequenced = $det->getAuthModeSequence();
 
  734                foreach($auth_sequenced as $auth_mode)
 
  746                                        $text = $this->lng->txt(
'auth_radius');
 
  749                                        $text = $this->lng->txt(
'auth_local');
 
  752                                        $text = $this->lng->txt(
'auth_soap');
 
  755                                        $text = $this->lng->txt(
'auth_apache');
 
  761                                                $option = $pl->getMultipleAuthModeOptions($auth_mode);
 
  762                                                $text = $option[$auth_mode][
'txt'];
 
  769                        $pos->setValue($counter++);
 
  771                        $pos->setMaxLength(1);
 
  772                        $option_determination->addSubItem($pos);
 
  774                $kind->addOption($option_determination);
 
  775                $this->form->addItem($kind);
 
  787                include_once(
'Services/Authentication/classes/class.ilAuthModeDetermination.php');
 
  790                $det->setKind((
int) 
$_POST[
'kind']);
 
  792                $pos = 
$_POST[
'position'] ? 
$_POST[
'position'] : array();
 
  793                asort($pos,SORT_NUMERIC);
 
  796                foreach($pos as $auth_mode => $dummy)
 
  798                        $position[$counter++] = $auth_mode;  
 
  800                $det->setAuthModeSequence($position ? $position : array());
 
  803                require_once 
'Services/Captcha/classes/class.ilCaptchaUtil.php';
 
  804                ilCaptchaUtil::setActiveForLogin((
bool)
$_POST[
'activate_captcha_anonym']);
 
  820                $next_class = $this->ctrl->getNextClass($this);
 
  821                $cmd = $this->ctrl->getCmd();
 
  825                if(!$ilAccess->checkAccess(
'read',
'',$this->object->getRefId()))
 
  827                        $ilErr->raiseError($this->lng->txt(
'msg_no_perm_read'),
$ilErr->WARNING);
 
  832                        case 'ilregistrationsettingsgui':
 
  834                                include_once 
'./Services/Registration/classes/class.ilRegistrationSettingsGUI.php';
 
  837                                $this->tabs_gui->setTabActive(
'registration_settings');
 
  839                                $this->ctrl->forwardCommand($registration_gui);
 
  842                        case 'ilpermissiongui':
 
  845                                $this->tabs_gui->setTabActive(
'perm_settings');
 
  847                                include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
 
  849                                $ret =& $this->ctrl->forwardCommand($perm_gui);
 
  852                        case 'illdapsettingsgui':
 
  855                                $this->tabs_gui->setTabActive(
'auth_ldap');
 
  857                                include_once 
'./Services/LDAP/classes/class.ilLDAPSettingsGUI.php';
 
  859                                $this->ctrl->forwardCommand($ldap_settings_gui);
 
  862                        case 'ilauthshibbolethsettingsgui':
 
  864                                $this->tabs_gui->setTabActive(
'auth_shib');
 
  865                                include_once(
'./Services/AuthShibboleth/classes/class.ilAuthShibbolethSettingsGUI.php');
 
  867                                $this->ctrl->forwardCommand($shib_settings_gui);
 
  870                        case 'ilcassettingsgui':
 
  872                                $this->tabs_gui->setTabActive(
'auth_cas');
 
  873                                include_once 
'./Services/CAS/classes/class.ilCASSettingsGUI.php';
 
  875                                $this->ctrl->forwardCommand($cas_settings);
 
  878                        case 'ilradiussettingsgui':
 
  880                                $this->tabs_gui->setTabActive(
'auth_radius');
 
  881                                include_once 
'./Services/Radius/classes/class.ilRadiusSettingsGUI.php';
 
  883                                $this->ctrl->forwardCommand($radius_settings_gui);
 
  886                        case 'ilopenidsettingsgui':
 
  888                                $this->tabs_gui->setTabActive(
'auth_openid');
 
  890                                include_once 
'./Services/OpenId/classes/class.ilOpenIdSettingsGUI.php';
 
  892                                $this->ctrl->forwardCommand($os);
 
  895                        case 'ilauthloginpageeditorgui':
 
  898                                $this->tabs_gui->setTabActive(
'authentication_settings');
 
  899                                $this->tabs_gui->setSubTabActive(
"auth_login_editor");
 
  901                                include_once 
'./Services/Authentication/classes/class.ilAuthLoginPageEditorGUI.php';
 
  903                                $this->ctrl->forwardCommand($lpe);
 
  909                                        $cmd = 
"authSettings";
 
  933                $this->ctrl->setParameter($this,
"ref_id",$this->object->getRefId());
 
  935                if ($rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
 
  937                        $tabs_gui->addTarget(
"authentication_settings", $this->ctrl->getLinkTarget($this, 
"authSettings"),
 
  940                        $tabs_gui->addTarget(
'registration_settings',
 
  941                                                                           $this->ctrl->getLinkTargetByClass(
'ilregistrationsettingsgui',
'view'));
 
  943                        $tabs_gui->addTarget(
"auth_ldap", $this->ctrl->getLinkTargetByClass(
'illdapsettingsgui',
'serverList'),
 
  947                        #$tabs_gui->addTarget("auth_ldap", $this->ctrl->getLinkTarget($this, "editLDAP"),
 
  950                        $tabs_gui->addTarget(
'auth_shib',$this->ctrl->getLinkTargetByClass(
'ilauthshibbolethsettingsgui',
'settings'));
 
  952                        $tabs_gui->addTarget(
 
  954                                $this->ctrl->getLinkTargetByClass(
'ilcassettingsgui',
'settings')
 
  957                        $tabs_gui->addTarget(
"auth_radius", $this->ctrl->getLinkTargetByClass(
'ilradiussettingsgui', 
"settings"),
 
  960                        $tabs_gui->addTarget(
"auth_soap", $this->ctrl->getLinkTarget($this, 
"editSOAP"),
 
  963                        $tabs_gui->addTarget(
 
  965                                $this->ctrl->getLinkTargetByClass(
'ilopenidsettingsgui',
'settings'),
 
  971                        $tabs_gui->addTarget(
"apache_auth_settings", $this->ctrl->getLinkTarget($this,
'apacheAuthSettings'),
 
  975                if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
 
  977                        $tabs_gui->addTarget(
"perm_settings",
 
  978                                $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'), 
"perm"),
 
  979                                                                 array(
"perm",
"info",
"owner"), 
'ilpermissiongui');
 
  988                global $rbacsystem,
$ilUser,$ilAccess;
 
  990                $GLOBALS[
'lng']->loadLanguageModule(
'auth');
 
  995                                if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
 
  997                                        $this->tabs_gui->addSubTabTarget(
"auth_settings",
 
  998                                                                                                         $this->ctrl->getLinkTarget($this,
'authSettings'),
 
 1001                                if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
 
 1003                                        $this->tabs_gui->addSubTabTarget(
 
 1004                                                'auth_login_editor',
 
 1005                                                $this->ctrl->getLinkTargetByClass(
'ilauthloginpageeditorgui',
''),
 
 1018                $this->tabs_gui->setTabActive(
"apache_auth_settings");
 
 1024                        $settings = 
new ilSetting(
'apache_auth');
 
 1025                        $settingsMap = $settings->getAll();
 
 1027                        $path = ILIAS_DATA_DIR . 
'/' . CLIENT_ID . 
'/apache_auth_allowed_domains.txt';                  
 
 1028                        if (file_exists(
$path) && is_readable(
$path)) {
 
 1029                                $settingsMap[
'apache_auth_domains'] = file_get_contents(
$path);
 
 1032                        $form->setValuesByArray($settingsMap);
 
 1034                $tpl->setVariable(
'ADM_CONTENT', $form->getHtml());
 
 1041                $form->setValuesByPost();
 
 1045                if ($form->checkInput())
 
 1047                        $settings = 
new ilSetting(
'apache_auth');
 
 1050                                'apache_auth_indicator_name', 
'apache_auth_indicator_value',
 
 1051                                'apache_enable_auth', 
'apache_enable_local', 
'apache_local_autocreate',
 
 1052                                'apache_enable_ldap', 
'apache_auth_username_config_type',
 
 1053                                'apache_auth_username_direct_mapping_fieldname',
 
 1054                                'apache_default_role', 
'apache_auth_target_override_login_page',
 
 1055                                'apache_auth_enable_override_login_page',
 
 1056                                'apache_auth_authenticate_on_login_page',
 
 1061                        foreach($fields as $field)
 
 1062                                $settings->set($field, $form->getInput($field));
 
 1064                        if ($form->getInput(
'apache_enable_auth'))
 
 1065                                $this->
ilias->setSetting(
'apache_active', 
true);
 
 1067                                $this->
ilias->setSetting(
'apache_active', 
false);
 
 1075                        file_put_contents(ILIAS_DATA_DIR . 
'/' . CLIENT_ID . 
'/apache_auth_allowed_domains.txt', $allowedDomains);
 
 1078                        $this->ctrl->redirect($this, 
'apacheAuthSettings');
 
 1088                include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
 1091                $form->setFormAction($this->ctrl->getFormAction($this));
 
 1092                $form->setTitle($this->lng->txt(
'apache_settings'));
 
 1094                $chb_enabled = 
new ilCheckboxInputGUI($this->lng->txt(
'apache_enable_auth'), 
'apache_enable_auth');
 
 1095                $form->addItem($chb_enabled);
 
 1097                $chb_local_create_account = 
new ilCheckboxInputGUI($this->lng->txt(
'apache_autocreate'), 
'apache_local_autocreate');
 
 1098                $chb_enabled->addSubitem($chb_local_create_account);
 
 1101                $roles = $rbacreview->getGlobalRolesArray();
 
 1102                $select = 
new ilSelectInputGUI($this->lng->txt(
'apache_default_role'), 
'apache_default_role');
 
 1103                $roleOptions = array();
 
 1104                foreach($roles as $role) {
 
 1107                $select->setOptions($roleOptions);
 
 1108                $select->setValue(4);
 
 1110                $chb_local_create_account->addSubitem($select);
 
 1112                $chb_local = 
new ilCheckboxInputGUI($this->lng->txt(
'apache_enable_local'), 
'apache_enable_local');
 
 1113                $form->addItem($chb_local);
 
 1115                $chb_ldap = 
new ilCheckboxInputGUI($this->lng->txt(
'apache_enable_ldap'), 
'apache_enable_ldap');
 
 1116                $chb_ldap->setInfo($this->lng->txt(
'apache_ldap_hint_ldap_must_be_configured'));
 
 1118                $GLOBALS[
'lng']->loadLanguageModule(
'auth');
 
 1119                include_once 
'./Services/LDAP/classes/class.ilLDAPServer.php';
 
 1123                        $ldap_server_select = 
new ilSelectInputGUI($this->lng->txt(
'auth_ldap_server_ds'), 
'apache_ldap_sid');
 
 1124                        $options[0] = $this->lng->txt(
'select_one');
 
 1125                        foreach($servers as $server_id)
 
 1128                                $options[$server_id] = $ldap_server->getName();
 
 1130                        $ldap_server_select->setOptions(
$options);
 
 1131                        $ldap_server_select->setRequired(
true);
 
 1134                        $ldap_server_select->setValue($ds);
 
 1136                        $chb_ldap->addSubItem($ldap_server_select);
 
 1138                $form->addItem($chb_ldap);
 
 1140                $txt = 
new ilTextInputGUI($this->lng->txt(
'apache_auth_indicator_name'), 
'apache_auth_indicator_name');
 
 1141                $txt->setRequired(
true);
 
 1142                $form->addItem(
$txt);
 
 1144                $txt = 
new ilTextInputGUI($this->lng->txt(
'apache_auth_indicator_value'), 
'apache_auth_indicator_value');
 
 1145                $txt->setRequired(
true);
 
 1146                $form->addItem(
$txt);
 
 1149                $chb = 
new ilCheckboxInputGUI($this->lng->txt(
'apache_auth_enable_override_login'), 
'apache_auth_enable_override_login_page');
 
 1150                $form->addItem($chb);
 
 1152                $txt = 
new ilTextInputGUI($this->lng->txt(
'apache_auth_target_override_login'), 
'apache_auth_target_override_login_page');
 
 1153                $txt->setRequired(
true);
 
 1154                $chb->addSubItem(
$txt);
 
 1156                $chb = 
new ilCheckboxInputGUI($this->lng->txt(
'apache_auth_authenticate_on_login_page'), 
'apache_auth_authenticate_on_login_page');
 
 1157                $form->addItem($chb);
 
 1160                $sec->setTitle($this->lng->txt(
'apache_auth_username_config'));
 
 1161                $form->addItem($sec);
 
 1163                $rag = 
new ilRadioGroupInputGUI($this->lng->txt(
'apache_auth_username_config_type'), 
'apache_auth_username_config_type');
 
 1164                $form->addItem($rag);
 
 1166                $rao = 
new ilRadioOption($this->lng->txt(
'apache_auth_username_direct_mapping'), 1);
 
 1167                $rag->addOption($rao);
 
 1169                $txt = 
new ilTextInputGUI($this->lng->txt(
'apache_auth_username_direct_mapping_fieldname'), 
'apache_auth_username_direct_mapping_fieldname');
 
 1171                $rao->addSubItem(
$txt);
 
 1173                $rao = 
new ilRadioOption($this->lng->txt(
'apache_auth_username_extended_mapping'), 2);
 
 1174                $rao->setDisabled(
true);
 
 1175                $rag->addOption($rao);
 
 1177                $rao = 
new ilRadioOption($this->lng->txt(
'apache_auth_username_by_function'), 3);
 
 1178                $rag->addOption($rao);
 
 1184                $sec->setTitle($this->lng->txt(
'apache_auth_security'));
 
 1185                $form->addItem($sec);
 
 1188                $txt->setInfo($this->lng->txt(
'apache_auth_domains_description'));
 
 1190                $form->addItem(
$txt);
 
 1192                $form->addCommandButton(
'saveApacheSettings',$this->lng->txt(
'save'));
 
 1193                $form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
 
 1199                return join(
"\n",  preg_split(
"/[\r\n]+/", 
$text));
 
 1211                                require_once 
'Services/Captcha/classes/class.ilCaptchaUtil.php';
 
 1216                                return array(
'authentication_settings' => array(
'authSettings', $fields));
 
Login page editor settings GUI ILIAS page editor or richtext editor.
static _getInstance()
Get instance.
Class ilAuthShibbolethSettingsGUI.
static getAuthPlugins()
Get active enabled auth plugins.
static _getAuthModeName($a_auth_key)
static checkFreetype()
Check whether captcha support is active.
static getServerIdByAuthMode($a_auth_mode)
Get auth id by auth mode.
static getDataSource($a_auth_mode)
static getInstanceByServerId($a_server_id)
Get instance by server id.
static isAuthModeLDAP($a_auth_mode)
Check if user auth mode is LDAP.
static getServerIds()
Get all server ids @global ilDB $ilDB.
Class ilObjAuthSettingsGUI.
validateApacheAuthAllowedDomains($text)
setSubTabs($a_tab)
set sub tabs
addToExternalSettingsForm($a_form_id)
saveScriptObject()
validates all input data, save them to database if correct and active chosen auth mode
getApacheAuthSettingsForm()
updateAuthModeDeterminationObject()
update auth mode determination
loginInfoObject()
displays login information of all installed languages
executeCommand()
Execute command.
apacheAuthSettingsObject($form=false)
ilObjAuthSettingsGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
Constructor @access public.
getAuthModeTitle()
get the title of auth mode
saveApacheSettingsObject()
getTabs(&$tabs_gui)
get tabs @access public
editSOAPObject()
Configure soap settings.
authSettingsObject()
display settings menu
viewObject()
list childs of current object
testSoapAuthConnectionObject()
initAuthModeDetermination()
init auth mode determinitation form
getAdminTabs(&$tabs_gui)
administration tabs show only permissions and trash folder
saveSOAPObject()
validates all input data, save them to database if correct and active chosen auth mode
editScriptObject()
Configure Custom settings.
_updateAuthMode($a_roles)
_lookupRegisterAllowed()
get all roles that are activated in user registration
_getNumberOfUsersPerAuthMode()
get number of users per auth mode
Class ilObjectGUI Basic methods of all Output classes.
ilObjectGUI($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
Constructor @access public.
getReturnLocation($a_cmd, $a_location="")
get return location for command (command is method name without "Object", e.g.
prepareOutput()
prepare output
static _lookupTitle($a_id)
lookup object title
@classDescription Open ID Settings GUI
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This class represents an option in a radio group.
Class ilRegistrationSettingsGUI.
This class represents a text area property in a property form.
This class represents a text property in a property form.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static redirect($a_script)
http redirect to other script
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if($err=$client->getError()) $namespace
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
redirection script todo: (a better solution should control the processing via a xml file)
if(!is_array($argv)) $options