2007-11-14 22:08:38 +00:00
|
|
|
<?php
|
|
|
|
|
2007-11-14 22:08:55 +00:00
|
|
|
require_once(dirname(dirname(dirname(__FILE__)))."/config.php");
|
2007-11-14 22:08:38 +00:00
|
|
|
|
|
|
|
//HTTPS is potentially required in this page
|
|
|
|
httpsrequired();
|
|
|
|
|
|
|
|
/// Define variables used in page
|
|
|
|
if (!$site = get_site()) {
|
2008-05-08 06:27:28 +00:00
|
|
|
print_error("siteisnotdefined");
|
2007-11-14 22:08:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
$authsequence = get_enabled_auth_plugins(true); // auths, in sequence
|
|
|
|
if (!in_array('ldap',$authsequence,true)) {
|
|
|
|
print_error('ldap_isdisabled','auth');
|
|
|
|
}
|
|
|
|
|
|
|
|
$authplugin = get_auth_plugin('ldap');
|
|
|
|
if (empty($authplugin->config->ntlmsso_enabled)) {
|
|
|
|
print_error('ntlmsso_isdisabled','auth');
|
|
|
|
}
|
|
|
|
|
|
|
|
$sesskey = sesskey();
|
|
|
|
|
|
|
|
//print_header("$site->fullname: $loginsite", $site->fullname, $loginsite, $focus, '', true);
|
2007-11-14 22:12:25 +00:00
|
|
|
$msg = '<p>'.get_string('ntlmsso_attempting','auth').'</p>'
|
2007-11-14 22:08:38 +00:00
|
|
|
. '<img width="1", height="1" '
|
|
|
|
. ' src="' . $CFG->wwwroot . '/auth/ldap/ntlmsso_magic.php?sesskey='
|
|
|
|
. $sesskey . '" />';
|
|
|
|
redirect($CFG->wwwroot . '/auth/ldap/ntlmsso_finish.php', $msg, 3);
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-05-08 06:27:28 +00:00
|
|
|
?>
|