From 7b6dc09310a6cc8972695a18ae7095fe1b9a2574 Mon Sep 17 00:00:00 2001
From: Olav Morken <olav.morken@uninett.no>
Date: Tue, 26 Jan 2010 10:07:33 +0000
Subject: [PATCH] saml2_Message: Set AuthnInstant in assertion.

Fixes issue 225.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2137 44740490-163a-0410-bde0-09ae8108e29a
---
 modules/saml2/lib/Message.php | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/saml2/lib/Message.php b/modules/saml2/lib/Message.php
index 8c7ffa060..1b049fadf 100644
--- a/modules/saml2/lib/Message.php
+++ b/modules/saml2/lib/Message.php
@@ -582,10 +582,13 @@ class sspmod_saml2_Message {
 
 		$a->setAuthnContext(SAML2_Const::AC_PASSWORD);
 
+		$session = SimpleSAML_Session::getInstance();
+
+		$a->setAuthnInstant($session->getAuthnInstant());
+
 		$sessionLifetime = $config->getInteger('session.duration', 8*60*60);
 		$a->setSessionNotOnOrAfter(time() + $sessionLifetime);
 
-		$session = SimpleSAML_Session::getInstance();
 		$sessionIndex = $session->getSessionIndex();
 		$a->setSessionIndex($sessionIndex);
 
-- 
GitLab