Skip to content
Snippets Groups Projects
Commit f46e8edc authored by Olav Morken's avatar Olav Morken
Browse files

Create a persistent session index for SAML2 SPs.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@786 44740490-163a-0410-bde0-09ae8108e29a
parent f2eece4f
No related branches found
No related tags found
No related merge requests found
......@@ -276,6 +276,9 @@ class SimpleSAML_Session {
$this->sessionindex = $sessionindex;
}
public function getSessionIndex() {
if($this->sessionindex === NULL) {
$this->sessionindex = SimpleSAML_Utilities::generateID();
}
return $this->sessionindex;
}
public function setNameID($nameid) {
......
......@@ -609,9 +609,11 @@ class SimpleSAML_XML_SAML20_AuthnResponse extends SimpleSAML_XML_AuthnResponse {
$issueInstant = SimpleSAML_Utilities::generateTimestamp();
$assertionExpire = SimpleSAML_Utilities::generateTimestamp(time() + 60 * 5);# 5 minutes
$notBefore = SimpleSAML_Utilities::generateTimestamp(time() - 30);
$assertionid = SimpleSAML_Utilities::generateID();
$sessionindex = SimpleSAML_Utilities::generateID();
$session = SimpleSAML_Session::getInstance();
$sessionindex = $session->getSessionIndex();
/**
......
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