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                foreach($auth_modes as $mode => $mode_name)
 
   93                                $this->tpl->setVariable(
"NUM_".strtoupper($mode_name),
 
   94                                        ((
int) $auth_cnt[$mode_name] + $auth_cnt[
"default"]).
" (".$this->lng->txt(
"auth_per_default").
 
   95                                                ": ".$auth_cnt[
"default"].
")");
 
   99                                $this->tpl->setVariable(
"NUM_".strtoupper($mode_name),
 
  100                                        (
int) $auth_cnt[$mode_name]);
 
  104                $this->tpl->setVariable(
"TXT_CONFIGURE", $this->lng->txt(
"auth_configure"));
 
  105                $this->tpl->setVariable(
"TXT_AUTH_REMARK", $this->lng->txt(
"auth_remark_non_local_auth"));
 
  106                $this->tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"save"));
 
  107                $this->tpl->setVariable(
"CMD_SUBMIT", 
"setAuthMode");
 
  110                $checked = 
"checked=\"checked\"";
 
  111                $disabled = 
"disabled=\"disabled\"";
 
  112                $style_disabled = 
"_disabled";
 
  115                $icon_ok = 
"<img src=\"".ilUtil::getImagePath(
"icon_ok.svg").
"\" alt=\"".$this->lng->txt(
"enabled").
"\" title=\"".$this->lng->txt(
"enabled").
"\" border=\"0\" vspace=\"0\"/>";
 
  116                $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\"/>";
 
  118                $this->tpl->setVariable(
"AUTH_LOCAL_ACTIVE", $icon_ok);
 
  120                include_once(
'Services/LDAP/classes/class.ilLDAPServer.php');
 
  122                #$this->tpl->setVariable("AUTH_LDAP_ACTIVE", $this->ilias->getSetting('ldap_active') ? $icon_ok : $icon_not_ok);
 
  123                $this->tpl->setVariable(
"AUTH_RADIUS_ACTIVE", $this->
ilias->getSetting(
'radius_active') ? $icon_ok : $icon_not_ok);
 
  124                $this->tpl->setVariable(
"AUTH_SHIB_ACTIVE", $this->
ilias->getSetting(
'shib_active') ? $icon_ok : $icon_not_ok);
 
  125                $this->tpl->setVariable(
"AUTH_SCRIPT_ACTIVE", $this->
ilias->getSetting(
'script_active') ? $icon_ok : $icon_not_ok);
 
  126                $this->tpl->setVariable(
"AUTH_CAS_ACTIVE", $this->
ilias->getSetting(
'cas_active') ? $icon_ok : $icon_not_ok);
 
  127                $this->tpl->setVariable(
"AUTH_APACHE_ACTIVE", $this->
ilias->getSetting(
'apache_active') ? $icon_ok : $icon_not_ok);
 
  130                switch ($this->
ilias->getSetting(
'auth_mode'))
 
  133                                $this->tpl->setVariable(
"CHK_LOCAL", $checked);
 
  137                                $this->tpl->setVariable(
"CHK_LDAP", $checked);
 
  141                                $this->tpl->setVariable(
"CHK_SHIB", $checked);
 
  145                                $this->tpl->setVariable(
"CHK_RADIUS", $checked);
 
  149                                $this->tpl->setVariable(
"CHK_CAS", $checked);
 
  153                                $this->tpl->setVariable(
"CHK_SCRIPT", $checked);
 
  157                                $this->tpl->setVariable(
"CHK_APACHE", $checked);
 
  164                        $this->tpl->setVariable(
'TABLE_AUTH_DETERMINATION',$this->form->getHTML());
 
  168                $this->tpl->setVariable(
"FORMACTION_ROLES",
 
  169                        $this->ctrl->getFormAction($this));
 
  170                $this->tpl->setVariable(
"TXT_AUTH_ROLES", $this->lng->txt(
"auth_active_roles"));
 
  171                $this->tpl->setVariable(
"TXT_ROLE", $this->lng->txt(
"obj_role"));
 
  172                $this->tpl->setVariable(
"TXT_ROLE_AUTH_MODE", $this->lng->txt(
"auth_role_auth_mode"));
 
  173                $this->tpl->setVariable(
"CMD_SUBMIT_ROLES", 
"updateAuthRoles");
 
  175                include_once(
"./Services/AccessControl/classes/class.ilObjRole.php");
 
  179                include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
 
  182                foreach ($reg_roles as $role)
 
  184                        foreach ($active_auth_modes as $auth_name => $auth_key)
 
  189                                if ($auth_name == 
"default" || $auth_name == 
"cas" 
  190                                        || $auth_name == 
"shibboleth" || $auth_name == 
'ldap'  
  191                                        || $auth_name == 
'apache' || $auth_name == 
"ecs" 
  192                                        || $auth_name == 
"openid")
 
  197                                $this->tpl->setCurrentBlock(
"auth_mode_selection");
 
  199                                if ($auth_name == 
'default')
 
  205                                        $name = $this->lng->txt(
'auth_'.$auth_name);
 
  208                                $this->tpl->setVariable(
"AUTH_MODE_NAME", $name);
 
  210                                $this->tpl->setVariable(
"AUTH_MODE", $auth_name);
 
  212                                if ($role[
'auth_mode'] == $auth_name)
 
  214                                        $this->tpl->setVariable(
"SELECTED_AUTH_MODE", 
"selected=\"selected\"");
 
  217                                $this->tpl->parseCurrentBlock();
 
  220                        $this->tpl->setCurrentBlock(
"roles");
 
  221                        $this->tpl->setVariable(
"ROLE", $role[
'title']);
 
  222                        $this->tpl->setVariable(
"ROLE_ID", $role[
'id']);
 
  223                        $this->tpl->parseCurrentBlock();
 
  238                if (!$rbacsystem->checkAccess(
"visible,read", $this->object->getRefId()))
 
  240                        $this->
ilias->raiseError($this->lng->txt(
"permission_denied"), $this->ilias->error_obj->MESSAGE);
 
  243                $this->tabs_gui->setTabActive(
"authentication_settings");
 
  245                $this->tabs_gui->setSubTabActive(
"auth_login_editor");
 
  247                $lng->loadLanguageModule(
"meta");
 
  249                $this->tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.auth_login_messages.html",
 
  250                        "Services/Authentication");
 
  251                $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
 
  252                $this->tpl->setVariable(
"TXT_HEADLINE", $this->lng->txt(
"login_information"));
 
  253                $this->tpl->setVariable(
"TXT_DESCRIPTION", $this->lng->txt(
"login_information_desc"));
 
  254                $this->tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"save"));
 
  255                $this->initLoginForm();
 
  256                $this->tpl->setVariable(
'LOGIN_INFO',$this->form->getHTML());
 
  262                $this->ctrl->redirect($this, 
"authSettings");
 
  269                if (!$rbacsystem->checkAccess(
"write",$this->object->getRefId()))
 
  271                        $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
 
  274                if (empty(
$_POST[
"auth_mode"]))
 
  276                        $this->
ilias->raiseError($this->lng->txt(
"auth_err_no_mode_selected"),$this->ilias->error_obj->MESSAGE);
 
  279                if (
$_POST[
"auth_mode"] == AUTH_DEFAULT)
 
  281                        ilUtil::sendInfo($this->lng->txt(
"auth_mode").
": ".$this->getAuthModeTitle().
" ".$this->lng->txt(
"auth_mode_not_changed"),
true);
 
  282                        $this->ctrl->redirect($this,
'authSettings');
 
  285                switch (
$_POST[
"auth_mode"])
 
  299                                if ($this->object->checkAuthSHIB() !== 
true)
 
  307                                if ($this->object->checkAuthRADIUS() !== 
true)
 
  310                                        $this->ctrl->redirect($this,
'editRADIUS');
 
  315                                if ($this->object->checkAuthScript() !== 
true)
 
  323                $this->
ilias->setSetting(
"auth_mode",
$_POST[
"auth_mode"]);
 
  325                ilUtil::sendSuccess($this->lng->txt(
"auth_default_mode_changed_to").
" ".$this->getAuthModeTitle(),
true);
 
  326                $this->ctrl->redirect($this,
'authSettings');
 
  338                if (!$rbacsystem->checkAccess(
"read",$this->object->getRefId()))
 
  340                        $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
 
  343                $this->tabs_gui->setTabActive(
'auth_soap');
 
  346                $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.auth_soap.html',
'Services/Authentication');
 
  349                $role_list = $rbacreview->getRolesByFilter(2,$this->object->getId());
 
  352                foreach ($role_list as $role)
 
  354                        $roles[$role[
'obj_id']] = $role[
'title'];
 
  358                include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
  361                $soap_config->setTitle($this->lng->txt(
"auth_soap_auth"));
 
  362                $soap_config->setDescription($this->lng->txt(
"auth_soap_auth_desc"));
 
  363                $soap_config->setFormAction($this->ctrl->getFormAction($this, 
"editSOAP"));
 
  364                $soap_config->addCommandButton(
"saveSOAP", $this->lng->txt(
"save"));
 
  365                $soap_config->addCommandButton(
"editSOAP", $this->lng->txt(
"cancel"));
 
  369                $active->setTitle($this->lng->txt(
"active"));
 
  370                $active->setPostVar(
"soap[active]");
 
  374                $server->setTitle($this->lng->txt(
"server"));
 
  375                $server->setInfo($this->lng->txt(
"auth_soap_server_desc"));
 
  376                $server->setPostVar(
"soap[server]");
 
  383                $port->setTitle($this->lng->txt(
"port"));
 
  384                $port->setInfo($this->lng->txt(
"auth_soap_port_desc"));
 
  385                $port->setPostVar(
"soap[port]");
 
  387                $port->setMaxLength(5);
 
  391                $https->setTitle($this->lng->txt(
"auth_soap_use_https"));
 
  392                $https->setPostVar(
"soap[use_https]");
 
  396                $uri->setTitle($this->lng->txt(
"uri"));
 
  397                $uri->setInfo($this->lng->txt(
"auth_soap_uri_desc"));
 
  398                $uri->setPostVar(
"soap[uri]");
 
  400                $uri->setMaxLength(256);
 
  404                $namespace->setTitle($this->lng->txt(
"auth_soap_namespace"));
 
  405                $namespace->setInfo($this->lng->txt(
"auth_soap_namespace_desc"));
 
  412                $dotnet->setTitle($this->lng->txt(
"auth_soap_use_dotnet"));
 
  413                $dotnet->setPostVar(
"soap[use_dotnet]");
 
  417                $createuser->setTitle($this->lng->txt(
"auth_create_users"));
 
  418                $createuser->setInfo($this->lng->txt(
"auth_soap_create_users_desc"));
 
  419                $createuser->setPostVar(
"soap[create_users]");
 
  423                $sendmail->setTitle($this->lng->txt(
"user_send_new_account_mail"));
 
  424                $sendmail->setInfo($this->lng->txt(
"auth_new_account_mail_desc"));
 
  425                $sendmail->setPostVar(
"soap[account_mail]");
 
  429                $defaultrole->setTitle($this->lng->txt(
"auth_user_default_role"));
 
  430                $defaultrole->setInfo($this->lng->txt(
"auth_soap_user_default_role_desc"));
 
  431                $defaultrole->setPostVar(
"soap[user_default_role]");
 
  432                $defaultrole->setOptions($roles);
 
  436                $allowlocal->setTitle($this->lng->txt(
"auth_allow_local"));
 
  437                $allowlocal->setInfo($this->lng->txt(
"auth_soap_allow_local_desc"));
 
  438                $allowlocal->setPostVar(
"soap[allow_local]");
 
  446                        $active         ->setChecked(
$_SESSION[
"error_post_vars"][
"soap"][
"active"]);
 
  448                        $port           ->setValue(
$_SESSION[
"error_post_vars"][
"soap"][
"port"]);
 
  449                        $https          ->setChecked(
$_SESSION[
"error_post_vars"][
"soap"][
"use_https"]);
 
  450                        $uri            ->setValue(
$_SESSION[
"error_post_vars"][
"soap"][
"uri"]);
 
  452                        $dotnet         ->setChecked(
$_SESSION[
"error_post_vars"][
"soap"][
"use_dotnet"]);
 
  453                        $createuser     ->setChecked(
$_SESSION[
"error_post_vars"][
"soap"][
"create_users"]);
 
  454                        $allowlocal     ->setChecked(
$_SESSION[
"error_post_vars"][
"soap"][
"allow_local"]);
 
  455                        $defaultrole->setValue(
$_SESSION[
"error_post_vars"][
"soap"][
"user_default_role"]);
 
  456                        $sendmail       ->setChecked(
$_SESSION[
"error_post_vars"][
"soap"][
"account_mail"]);
 
  460                        $active         ->setChecked($settings[
"soap_auth_active"]);
 
  461                        $server         ->setValue($settings[
"soap_auth_server"]);
 
  462                        $port           ->setValue($settings[
"soap_auth_port"]);
 
  463                        $https          ->setChecked($settings[
"soap_auth_use_https"]);
 
  464                        $uri            ->setValue($settings[
"soap_auth_uri"]);
 
  465                        $namespace      ->setValue($settings[
"soap_auth_namespace"]);
 
  466                        $dotnet         ->setChecked($settings[
"soap_auth_use_dotnet"]);
 
  467                        $createuser     ->setChecked($settings[
"soap_auth_create_users"]);
 
  468                        $allowlocal     ->setChecked($settings[
"soap_auth_allow_local"]);
 
  469                        $defaultrole->setValue($settings[
"soap_auth_user_default_role"]);
 
  470                        $sendmail       ->setChecked($settings[
"soap_auth_account_mail"]);
 
  473                if (!$defaultrole->getValue())
 
  475                        $defaultrole->setValue(4);
 
  479                $soap_config->addItem($active);
 
  480                $soap_config->addItem(
$server);
 
  481                $soap_config->addItem($port);
 
  482                $soap_config->addItem(
$https);
 
  483                $soap_config->addItem($uri);
 
  485                $soap_config->addItem($dotnet);
 
  486                $soap_config->addItem($createuser);
 
  487                $soap_config->addItem($sendmail);
 
  488                $soap_config->addItem($defaultrole);
 
  489                $soap_config->addItem($allowlocal);
 
  491                $this->tpl->setVariable(
"CONFIG_FORM", $soap_config->getHTML());
 
  495                $form->setFormAction(
$ilCtrl->getFormAction($this));
 
  496                $form->setTitle(
"Test Request");
 
  498                $form->addItem($text_prop);
 
  500                $form->addItem($text_prop2);
 
  504                $form->addCommandButton(
"testSoapAuthConnection",
 
  507                if (
$ilCtrl->getCmd() == 
"testSoapAuthConnection")
 
  509                        include_once(
"./Services/SOAPAuth/classes/class.ilSOAPAuth.php");
 
  510                        $ret = 
"<br />".ilSOAPAuth::testConnection(
 
  513                                (
boolean) 
$_POST[
"new_user"]
 
  516                $this->tpl->setVariable(
"TEST_FORM", $form->getHTML().$ret);
 
  533                if (!$rbacsystem->checkAccess(
"write",$this->object->getRefId()))
 
  535                        $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
 
  539                if (!
$_POST[
"soap"][
"server"])
 
  541                        $this->
ilias->raiseError($this->lng->txt(
"fill_out_all_required_fields"),$this->ilias->error_obj->MESSAGE);
 
  545                if (
$_POST[
"soap"][
"server"] != 
"" && (preg_match(
"/^[0-9]{0,5}$/",
$_POST[
"soap"][
"port"])) == 
false)
 
  547                        $this->
ilias->raiseError($this->lng->txt(
"err_invalid_port"),$this->ilias->error_obj->MESSAGE);
 
  560                $ilSetting->set(
"soap_auth_user_default_role", 
$_POST[
"soap"][
"user_default_role"]);
 
  563                $this->ctrl->redirect($this,
'editSOAP');
 
  575                if (!$rbacsystem->checkAccess(
"write",$this->object->getRefId()))
 
  577                        $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
 
  582                        $this->tpl->setVariable(
"AUTH_SCRIPT_NAME", 
$_SESSION[
"error_post_vars"][
"auth_script"][
"name"]);
 
  587                        $settings = $this->
ilias->getAllSettings();
 
  589                        $this->tpl->setVariable(
"AUTH_SCRIPT_NAME", $settings[
"auth_script_name"]);
 
  592                $this->tabs_gui->setTabActive(
'auth_script');
 
  594                $this->tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.auth_script.html",
 
  595                        "Services/Authentication");
 
  597                $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
 
  598                $this->tpl->setVariable(
"COLSPAN", 3);
 
  599                $this->tpl->setVariable(
"TXT_AUTH_SCRIPT_TITLE", $this->lng->txt(
"auth_script_configure"));
 
  600                $this->tpl->setVariable(
"TXT_OPTIONS", $this->lng->txt(
"options"));
 
  601                $this->tpl->setVariable(
"TXT_AUTH_SCRIPT_NAME", $this->lng->txt(
"auth_script_name"));
 
  603                $this->tpl->setVariable(
"TXT_REQUIRED_FLD", $this->lng->txt(
"required_field"));
 
  604                $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
 
  605                $this->tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"save"));
 
  606                $this->tpl->setVariable(
"CMD_SUBMIT", 
"saveScript");
 
  617                if (!
$_POST[
"auth_script"][
"name"])
 
  619                        $this->
ilias->raiseError($this->lng->txt(
"fill_out_all_required_fields"),$this->ilias->error_obj->MESSAGE);
 
  632                $this->
ilias->setSetting(
"auth_script_name", 
$_POST[
"auth_script"][
"name"]);
 
  635                ilUtil::sendSuccess($this->lng->txt(
"auth_mode_changed_to").
" ".$this->getAuthModeTitle(),
true);
 
  636                $this->ctrl->redirect($this,
'editScript');
 
  648                switch ($this->
ilias->getSetting(
"auth_mode"))
 
  651                                return $this->lng->txt(
"auth_local");
 
  655                                return $this->lng->txt(
"auth_ldap");
 
  659                                return $this->lng->txt(
"auth_shib");
 
  663                                return $this->lng->txt(
"auth_radius");
 
  667                                return $this->lng->txt(
"auth_script");
 
  671                                return $this->lng->txt(
"auth_apache");
 
  675                                return $this->lng->txt(
"unknown");
 
  684                if (!$rbacsystem->checkAccess(
"write",$this->object->getRefId()))
 
  686                        $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
 
  689                include_once(
'./Services/AccessControl/classes/class.ilObjRole.php');
 
  693                $this->ctrl->redirect($this,
'authSettings');
 
  703                if(is_object($this->form))
 
  709                include_once(
'Services/Authentication/classes/class.ilAuthModeDetermination.php');
 
  711                if($det->getCountActiveAuthModes() <= 1)
 
  716                include_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
 
  718                $this->form->setFormAction($this->ctrl->getFormAction($this));
 
  719                $this->form->setTableWidth(
'100%');
 
  720                $this->form->setTitle($this->lng->txt(
'auth_auth_settings'));
 
  721                $this->form->addCommandButton(
'updateAuthModeDetermination',$this->lng->txt(
'save'));
 
  723                require_once 
'Services/Captcha/classes/class.ilCaptchaUtil.php';
 
  724                $cap = 
new ilCheckboxInputGUI($this->lng->txt(
'adm_captcha_anonymous_short'), 
'activate_captcha_anonym');
 
  725                $cap->setInfo($this->lng->txt(
'adm_captcha_anonymous_auth'));
 
  729                        $cap->setAlert(ilCaptchaUtil::getPreconditionsMessage());
 
  731                $cap->setChecked(ilCaptchaUtil::isActiveForLogin());
 
  732                $this->form->addItem($cap);
 
  735                $header->setTitle($this->lng->txt(
'auth_auth_mode_determination'));
 
  736                $this->form->addItem($header);
 
  739                $kind->setInfo($this->lng->txt(
'auth_mode_determination_info'));
 
  740                $kind->setValue($det->getKind());
 
  741                $kind->setRequired(
true);
 
  743                $option_user = 
new ilRadioOption($this->lng->txt(
'auth_by_user'),0);
 
  744                $kind->addOption($option_user);
 
  746                $option_determination = 
new ilRadioOption($this->lng->txt(
'auth_automatic'),1);
 
  748                include_once(
'Services/Authentication/classes/class.ilAuthUtils.php');
 
  750                $auth_sequenced = $det->getAuthModeSequence();
 
  752                foreach($auth_sequenced as $auth_mode)
 
  757                                        $text = $this->lng->txt(
'auth_ldap');
 
  760                                        $text = $this->lng->txt(
'auth_radius');
 
  763                                        $text = $this->lng->txt(
'auth_local');
 
  766                                        $text = $this->lng->txt(
'auth_soap');
 
  769                                        $text = $this->lng->txt(
'auth_apache');
 
  775                                                $option = $pl->getMultipleAuthModeOptions($auth_mode);
 
  776                                                $text = $option[$auth_mode][
'txt'];
 
  784                        $pos->setValue($counter++);
 
  786                        $pos->setMaxLength(1);
 
  787                        $option_determination->addSubItem($pos);
 
  789                $kind->addOption($option_determination);
 
  790                $this->form->addItem($kind);
 
  802                include_once(
'Services/Authentication/classes/class.ilAuthModeDetermination.php');
 
  805                $det->setKind((
int) 
$_POST[
'kind']);
 
  807                $pos = 
$_POST[
'position'] ? 
$_POST[
'position'] : array();
 
  808                asort($pos,SORT_NUMERIC);
 
  811                foreach($pos as $auth_mode => $dummy)
 
  813                        $position[$counter++] = $auth_mode;  
 
  815                $det->setAuthModeSequence($position ? $position : array());
 
  818                require_once 
'Services/Captcha/classes/class.ilCaptchaUtil.php';
 
  819                ilCaptchaUtil::setActiveForLogin((
bool)
$_POST[
'activate_captcha_anonym']);
 
  835                $next_class = $this->ctrl->getNextClass($this);
 
  836                $cmd = $this->ctrl->getCmd();
 
  840                if(!$ilAccess->checkAccess(
'read',
'',$this->object->getRefId()))
 
  842                        $ilErr->raiseError($this->lng->txt(
'msg_no_perm_read'),
$ilErr->WARNING);
 
  847                        case 'ilregistrationsettingsgui':
 
  849                                include_once 
'./Services/Registration/classes/class.ilRegistrationSettingsGUI.php';
 
  852                                $this->tabs_gui->setTabActive(
'registration_settings');
 
  854                                $this->ctrl->forwardCommand($registration_gui);
 
  857                        case 'ilpermissiongui':
 
  860                                $this->tabs_gui->setTabActive(
'perm_settings');
 
  862                                include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
 
  864                                $ret =& $this->ctrl->forwardCommand($perm_gui);
 
  867                        case 'illdapsettingsgui':
 
  870                                $this->tabs_gui->setTabActive(
'auth_ldap');
 
  872                                include_once 
'./Services/LDAP/classes/class.ilLDAPSettingsGUI.php';
 
  874                                $this->ctrl->forwardCommand($ldap_settings_gui);
 
  877                        case 'ilauthshibbolethsettingsgui':
 
  879                                $this->tabs_gui->setTabActive(
'auth_shib');
 
  880                                include_once(
'./Services/AuthShibboleth/classes/class.ilAuthShibbolethSettingsGUI.php');
 
  882                                $this->ctrl->forwardCommand($shib_settings_gui);
 
  885                        case 'ilcassettingsgui':
 
  887                                $this->tabs_gui->setTabActive(
'auth_cas');
 
  888                                include_once 
'./Services/CAS/classes/class.ilCASSettingsGUI.php';
 
  890                                $this->ctrl->forwardCommand($cas_settings);
 
  893                        case 'ilradiussettingsgui':
 
  895                                $this->tabs_gui->setTabActive(
'auth_radius');
 
  896                                include_once 
'./Services/Radius/classes/class.ilRadiusSettingsGUI.php';
 
  898                                $this->ctrl->forwardCommand($radius_settings_gui);
 
  901                        case 'ilopenidsettingsgui':
 
  903                                $this->tabs_gui->setTabActive(
'auth_openid');
 
  905                                include_once 
'./Services/OpenId/classes/class.ilOpenIdSettingsGUI.php';
 
  907                                $this->ctrl->forwardCommand($os);
 
  910                        case 'ilauthloginpageeditorgui':
 
  913                                $this->tabs_gui->setTabActive(
'authentication_settings');
 
  914                                $this->tabs_gui->setSubTabActive(
"auth_login_editor");
 
  916                                include_once 
'./Services/Authentication/classes/class.ilAuthLoginPageEditorGUI.php';
 
  918                                $this->ctrl->forwardCommand($lpe);
 
  924                                        $cmd = 
"authSettings";
 
  948                $this->ctrl->setParameter($this,
"ref_id",$this->object->getRefId());
 
  950                if ($rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
 
  952                        $tabs_gui->addTarget(
"authentication_settings", $this->ctrl->getLinkTarget($this, 
"authSettings"),
 
  955                        $tabs_gui->addTarget(
'registration_settings',
 
  956                                                                           $this->ctrl->getLinkTargetByClass(
'ilregistrationsettingsgui',
'view'));
 
  958                        $tabs_gui->addTarget(
"auth_ldap", $this->ctrl->getLinkTargetByClass(
'illdapsettingsgui',
'serverList'),
 
  962                        #$tabs_gui->addTarget("auth_ldap", $this->ctrl->getLinkTarget($this, "editLDAP"),
 
  965                        $tabs_gui->addTarget(
'auth_shib',$this->ctrl->getLinkTargetByClass(
'ilauthshibbolethsettingsgui',
'settings'));
 
  967                        $tabs_gui->addTarget(
 
  969                                $this->ctrl->getLinkTargetByClass(
'ilcassettingsgui',
'settings')
 
  972                        $tabs_gui->addTarget(
"auth_radius", $this->ctrl->getLinkTargetByClass(
'ilradiussettingsgui', 
"settings"),
 
  975                        $tabs_gui->addTarget(
"auth_soap", $this->ctrl->getLinkTarget($this, 
"editSOAP"),
 
  978                        $tabs_gui->addTarget(
 
  980                                $this->ctrl->getLinkTargetByClass(
'ilopenidsettingsgui',
'settings'),
 
  986                        $tabs_gui->addTarget(
"apache_auth_settings", $this->ctrl->getLinkTarget($this,
'apacheAuthSettings'),
 
  990                if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
 
  992                        $tabs_gui->addTarget(
"perm_settings",
 
  993                                $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'), 
"perm"),
 
  994                                                                 array(
"perm",
"info",
"owner"), 
'ilpermissiongui');
 
 1003                global $rbacsystem,
$ilUser,$ilAccess;
 
 1005                $GLOBALS[
'lng']->loadLanguageModule(
'auth');
 
 1009                        case 'authSettings':                            
 
 1010                                if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
 
 1012                                        $this->tabs_gui->addSubTabTarget(
"auth_settings",
 
 1013                                                                                                         $this->ctrl->getLinkTarget($this,
'authSettings'),
 
 1016                                if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
 
 1018                                        $this->tabs_gui->addSubTabTarget(
 
 1019                                                'auth_login_editor',
 
 1020                                                $this->ctrl->getLinkTargetByClass(
'ilauthloginpageeditorgui',
''),
 
 1033                $this->tabs_gui->setTabActive(
"apache_auth_settings");
 
 1040                        $settings = 
new ilSetting(
'apache_auth');
 
 1041                        $settingsMap = $settings->getAll();
 
 1043                        $path = ILIAS_DATA_DIR . 
'/' . CLIENT_ID . 
'/apache_auth_allowed_domains.txt';                  
 
 1044                        if (file_exists(
$path) && is_readable(
$path)) {
 
 1045                                $settingsMap[
'apache_auth_domains'] = file_get_contents(
$path);
 
 1048                        $form->setValuesByArray($settingsMap);
 
 1050                $tpl->setVariable(
'ADM_CONTENT', $form->getHtml());
 
 1057                $form->setValuesByPost();
 
 1061                if ($form->checkInput())
 
 1063                        $settings = 
new ilSetting(
'apache_auth');
 
 1066                                'apache_auth_indicator_name', 
'apache_auth_indicator_value',
 
 1067                                'apache_enable_auth', 
'apache_enable_local', 
'apache_local_autocreate',
 
 1068                                'apache_enable_ldap', 
'apache_auth_username_config_type',
 
 1069                                'apache_auth_username_direct_mapping_fieldname',
 
 1070                                'apache_default_role', 
'apache_auth_target_override_login_page',
 
 1071                                'apache_auth_enable_override_login_page',
 
 1072                                'apache_auth_authenticate_on_login_page' 
 1076                        foreach($fields as $field)
 
 1077                                $settings->set($field, $form->getInput($field));
 
 1079                        if ($form->getInput(
'apache_enable_auth'))
 
 1080                                $this->
ilias->setSetting(
'apache_active', 
true);
 
 1082                                $this->
ilias->setSetting(
'apache_active', 
false);
 
 1090                        file_put_contents(ILIAS_DATA_DIR . 
'/' . CLIENT_ID . 
'/apache_auth_allowed_domains.txt', $allowedDomains);
 
 1093                        $this->ctrl->redirect($this, 
'apacheAuthSettings');
 
 1103                include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
 1106                $form->setFormAction($this->ctrl->getFormAction($this));
 
 1107                $form->setTitle($this->lng->txt(
'apache_settings'));
 
 1109                $chb_enabled = 
new ilCheckboxInputGUI($this->lng->txt(
'apache_enable_auth'), 
'apache_enable_auth');
 
 1110                $form->addItem($chb_enabled);
 
 1112                $chb_local_create_account = 
new ilCheckboxInputGUI($this->lng->txt(
'apache_autocreate'), 
'apache_local_autocreate');
 
 1113                $chb_enabled->addSubitem($chb_local_create_account);
 
 1116                $roles = $rbacreview->getGlobalRolesArray();
 
 1117                $select = 
new ilSelectInputGUI($this->lng->txt(
'apache_default_role'), 
'apache_default_role');
 
 1118                $roleOptions = array();
 
 1119                foreach($roles as $role) {
 
 1122                $select->setOptions($roleOptions);
 
 1123                $select->setValue(4);
 
 1125                $chb_local_create_account->addSubitem($select);
 
 1127                $chb_local = 
new ilCheckboxInputGUI($this->lng->txt(
'apache_enable_local'), 
'apache_enable_local');
 
 1128                $form->addItem($chb_local);
 
 1130                $chb_ldap = 
new ilCheckboxInputGUI($this->lng->txt(
'apache_enable_ldap'), 
'apache_enable_ldap');
 
 1131                $chb_ldap->setInfo($this->lng->txt(
'apache_ldap_hint_ldap_must_be_configured'));
 
 1132                $form->addItem($chb_ldap);
 
 1134                $txt = 
new ilTextInputGUI($this->lng->txt(
'apache_auth_indicator_name'), 
'apache_auth_indicator_name');
 
 1135                $txt->setRequired(
true);
 
 1136                $form->addItem(
$txt);
 
 1138                $txt = 
new ilTextInputGUI($this->lng->txt(
'apache_auth_indicator_value'), 
'apache_auth_indicator_value');
 
 1139                $txt->setRequired(
true);
 
 1140                $form->addItem(
$txt);
 
 1143                $chb = 
new ilCheckboxInputGUI($this->lng->txt(
'apache_auth_enable_override_login'), 
'apache_auth_enable_override_login_page');
 
 1144                $form->addItem($chb);
 
 1146                $txt = 
new ilTextInputGUI($this->lng->txt(
'apache_auth_target_override_login'), 
'apache_auth_target_override_login_page');
 
 1147                $txt->setRequired(
true);
 
 1148                $chb->addSubItem(
$txt);
 
 1150                $chb = 
new ilCheckboxInputGUI($this->lng->txt(
'apache_auth_authenticate_on_login_page'), 
'apache_auth_authenticate_on_login_page');
 
 1151                $form->addItem($chb);
 
 1154                $sec->setTitle($this->lng->txt(
'apache_auth_username_config'));
 
 1155                $form->addItem($sec);
 
 1157                $rag = 
new ilRadioGroupInputGUI($this->lng->txt(
'apache_auth_username_config_type'), 
'apache_auth_username_config_type');
 
 1158                $form->addItem($rag);
 
 1160                $rao = 
new ilRadioOption($this->lng->txt(
'apache_auth_username_direct_mapping'), 1);
 
 1161                $rag->addOption($rao);
 
 1163                $txt = 
new ilTextInputGUI($this->lng->txt(
'apache_auth_username_direct_mapping_fieldname'), 
'apache_auth_username_direct_mapping_fieldname');
 
 1165                $rao->addSubItem(
$txt);
 
 1167                $rao = 
new ilRadioOption($this->lng->txt(
'apache_auth_username_extended_mapping'), 2);
 
 1168                $rao->setDisabled(
true);
 
 1169                $rag->addOption($rao);
 
 1171                $rao = 
new ilRadioOption($this->lng->txt(
'apache_auth_username_by_function'), 3);
 
 1172                $rag->addOption($rao);
 
 1178                $sec->setTitle($this->lng->txt(
'apache_auth_security'));
 
 1179                $form->addItem($sec);
 
 1182                $txt->setInfo($this->lng->txt(
'apache_auth_domains_description'));
 
 1184                $form->addItem(
$txt);
 
 1186                $form->addCommandButton(
'saveApacheSettings',$this->lng->txt(
'save'));
 
 1187                $form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
 
 1193                return join(
"\n",  preg_split(
"/[\r\n]+/", $text));
 
 1205                                require_once 
'Services/Captcha/classes/class.ilCaptchaUtil.php';
 
 1210                                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 _getActiveServerList()
Get active server list.
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
redirection script todo: (a better solution should control the processing via a xml file)