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

Secure cookies

parent 925e67cd
No related branches found
No related tags found
No related merge requests found
......@@ -279,18 +279,12 @@ class Cookie extends \SimpleSAML\Module\consent\Store
$globalConfig = \SimpleSAML\Configuration::getInstance();
$params = array(
'lifetime' => (90*24*60*60),
'lifetime' => 7776000, // (90*24*60*60)
'path' => ($globalConfig->getBasePath()),
'httponly' => false,
'httponly' => true,
'secure' => \SimpleSAML\Utils\HTTP::isHTTPS(),
);
if (\SimpleSAML\Utils\HTTP::isHTTPS()) {
// Enable secure cookie for https-requests
$params['secure'] = true;
} else {
$params['secure'] = false;
}
\SimpleSAML\Utils\HTTP::setCookie($name, $value, $params, false);
}
}
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