37 require_once(
'CAS.php');
39 spl_autoload_unregister(
'fusiondirectory_autoload');
40 spl_autoload_register(
'fusiondirectory_autoload');
42 if ($config->get_cfg_value(
'CasVerbose') ==
'TRUE') {
43 phpCAS::setVerbose(TRUE);
47 if ($config->get_cfg_value(
'CasLibraryBool') ===
'TRUE') {
50 $config->get_cfg_value(
'CasHost',
'localhost'),
51 (int) ($config->get_cfg_value(
'CasPort', 443)),
52 $config->get_cfg_value(
'CasContext'),
53 $config->get_cfg_value(
'CasClientServiceName')
58 $config->get_cfg_value(
'CasHost',
'localhost'),
59 (int) ($config->get_cfg_value(
'CasPort', 443)),
60 $config->get_cfg_value(
'CasContext')
65 phpCAS::setCasServerCACert($config->get_cfg_value(
'CasServerCaCertPath'));
71 global $config, $message, $ui;
81 phpCAS::setFixedServiceURL(preg_replace(
'/\?.*$/',
'', phpCAS::getServiceURL()));
84 phpCAS::forceAuthentication();
85 static::$username = phpCAS::getUser();
92 _(
'CAS user "%s" could not be found in LDAP'),
96 } elseif (is_string($ui)) {
99 _(
'Login with user "%s" triggered error: %s'),
108 $success = static::runSteps([
109 'checkForLockingBranch',
110 'loginAndCheckExpired',
119 if (!empty($message)) {
122 _(
'Login with user "%s" triggered error: %s'),
htmlescape(string $str)
Escape string for HTML output.
static getLdapUser(string $username)
Get user from LDAP directory.
static get_dialogs()
Accessor of the message dialog rendered HTML.
static getLabel()
Displayed name.
Base class for login methods.
Fatal error class. Does not extend FusionDirectoryError.
static initCAS()
Initialize phpCAS library.
static loginProcess()
All login steps in the right order for CAS login.