SAML: set sessionIndex in assertion, to be compliant with simpleSAMLphp logout

This commit is contained in:
Clément Oudot 2010-04-26 15:47:09 +00:00
parent 6ef67cc5ea
commit 844a8807b0

View File

@ -508,6 +508,13 @@ sub issuerForAuthUser {
my @attributes_statement = ($attribute_statement);
$response_assertions[0]->AttributeStatement(@attributes_statement);
# Set sessionIndex
# sessionIndex is the 4 first characters of session_id
my $sessionIndex = substr $session_id, 0, 4;
my @authn_statements = $response_assertions[0]->AuthnStatement();
$authn_statements[0]->SessionIndex($sessionIndex);
$response_assertions[0]->AuthnStatement(@authn_statements);
# Set response assertion
$login->response->Assertion(@response_assertions);