Skip to content
Snippets Groups Projects
Commit 6a6c13a8 authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Fix negotiate for old ui

parent 4238c9b9
No related branches found
No related tags found
No related merge requests found
......@@ -49,7 +49,6 @@ class Negotiate extends \SimpleSAML\Auth\Source
if (!extension_loaded('krb5')) {
throw new \Exception('KRB5 Extension not installed');
}
// call the parent constructor first, as required by the interface
parent::__construct($info, $config);
......@@ -242,15 +241,13 @@ class Negotiate extends \SimpleSAML\Auth\Source
$config = \SimpleSAML\Configuration::getInstance();
$url = htmlspecialchars(\SimpleSAML\Module::getModuleURL('negotiate/backend.php', $params));
$json_url = json_encode($url);
header('HTTP/1.1 401 Unauthorized');
header('WWW-Authenticate: Negotiate', false);
$t = new \SimpleSAML\XHTML\Template($config, 'negotiate:redirect.twig');
$t = new \SimpleSAML\XHTML\Template($config, 'negotiate:redirect.php');
$t->data['baseurlpath'] = \SimpleSAML\Module::getModuleURL('negotiate');
$t->data['url'] = $url;
$t->data['json_url'] = $json_url;
$t->show();
}
......
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<script src="<?php echo $this->data['baseurlpath']; ?>/assets/js/redirect.js"></script>
<title>Redirect to login</title>
</head>
<body>
<p>Your browser seems to have Javascript disabled. Please click <a id="redirect" href="<?php echo $this->data['url']; ?>">here</a>.</p>
</body>
</html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment