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

Further twigify adfs

parent 3d2ea810
No related branches found
No related tags found
No related merge requests found
......@@ -131,24 +131,13 @@ MSG;
private static function postResponse($url, $wresult, $wctx)
{
$wresult = htmlspecialchars($wresult);
$wctx = htmlspecialchars($wctx);
$post = <<<MSG
<body onload="document.forms[0].submit()">
<form method="post" action="$url">
<input type="hidden" name="wa" value="wsignin1.0">
<input type="hidden" name="wresult" value="$wresult">
<input type="hidden" name="wctx" value="$wctx">
<noscript>
<input type="submit" value="Continue">
</noscript>
</form>
</body>
MSG;
echo $post;
exit;
$config = \SimpleSAML\Configuration::getInstance();
$t = new \SimpleSAML\XHTML\Template($config, 'adfs:postResponse.twig');
$t->data['baseurlpath'] = \SimpleSAML\Module::getModuleUrl('adfs');
$t->data['url'] = $url;
$t->data['wresult'] = $wresult;
$t->data['wctx'] = $wctx;
$t->show();
}
public static function sendResponse(array $state)
......
<!DOCTYPE html>
<html>
<head>
<script src="{{ baseurlpath }}/assets/js/postResponse.js"></script>
</head>
<body>
<form method="post" action="{{ url }}">
<input type="hidden" name="wa" value="wsignin1.0">
<input type="hidden" name="wresult" value="{{ wresult|escape('html') }}">
<input type="hidden" name="wctx" value="{{ wctx|escape('html') }}">
<noscript>
<input type="submit" value="Continue">
</noscript>
</form>
</body>
</html>
document.addEventListener('DOMContentLoaded', function () {
document.forms[0].submit();
});
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