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

WS-Fed: Check date conditions.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@649 44740490-163a-0410-bde0-09ae8108e29a
parent 5450fb0f
No related branches found
No related tags found
No related merge requests found
......@@ -95,6 +95,15 @@ try {
$idpEntityId . '\'.');
}
/* Check time constraints of contitions (if present). */
foreach($xpath->query('./saml:Conditions', $assertion) as $condition) {
$notBefore = $condition->getAttribute('NotBefore');
$notOnOrAfter = $condition->getAttribute('NotOnOrAfter');
if(!SimpleSAML_Utilities::checkDateConditions($notBefore, $notOnOrAfter)) {
throw new Exception('The response has expired.');
}
}
/* Extract the name identifier from the response. */
$nameid = $xpath->query('./saml:AuthenticationStatement/saml:Subject/saml:NameIdentifier', $assertion);
......
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