ILIAS  release_8 Revision v8.24
class.ilObjAuthSettings.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
25{
30 public function __construct(int $a_id = 0, bool $a_call_by_reference = true)
31 {
32 $this->type = "auth";
33 parent::__construct($a_id, $a_call_by_reference);
34 }
35
36 public function checkAuthLDAP(): bool
37 {
38 $settings = $this->ilias->getAllSettings();
39
40 if (!$settings["ldap_server"] || !$settings["ldap_basedn"] || !$settings["ldap_port"]) {
41 return false;
42 }
43
44 $this->ilias->setSetting('ldap_active', "1");
45
46 return true;
47 }
48
49 public function checkAuthSHIB(): bool
50 {
51 $settings = $this->ilias->getAllSettings();
52
53 if (!$settings["shib_hos_type"] || !isset($settings["shib_user_default_role"]) || !$settings["shib_login"]
54 || !$settings["shib_firstname"] || !$settings["shib_lastname"]) {
55 return false;
56 }
57
58 $this->ilias->setSetting('shibboleth_active', "1");
59
60 return true;
61 }
62
63 public function checkAuthScript(): bool
64 {
65 $settings = $this->ilias->getAllSettings();
66
67 if (!$settings["auth_script_name"]) {
68 return false;
69 }
70
71 $this->ilias->setSetting('script_active', "1");
72
73 return true;
74 }
75}
__construct(int $a_id=0, bool $a_call_by_reference=true)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
array $settings
Setting values (LTI parameters, custom parameters and local parameters).
Definition: System.php:200
header include for all ilias files.